title: How to create a form in PHP/MySQL to add allowed IPs to the website?
body: <p>I'm looking for some help and advice, and can't seem to find an answer.</p>
  
  <p>I have a website, that I want to be completely blocked off from everyone, besides a few that I allow to use the website.</p>
  
  <p>I was wondering if there is a way to make a table/form on my website to add the specified IP to an allow list?</p>
  
  <p>I currently use this, but I find it's not very effective as I have to change the actual file manually to add the IP each time.</p>
  
  <pre><code>&lt;?php
  $allowlist = array(
      '00.000.000.000' /* Example */
  );
  
  if(!in_array($_SERVER['REMOTE_ADDR'],$allowlist)){
      die('This website cannot be accessed from your location.');
  }
  ?&gt;
  </code></pre>
  
  <p>Any help of advice would be greatly appreciated! Thanks.</p>