title: Notice: Undefined index: id in C:\xampp\htdocs\Project\modify.php on line 4
body: <p>I've been trying to get this code to work for a long time now but i keep getting this error:
  <strong>Notice: Undefined index: id in C:\xampp\htdocs\Project\modify.php on line 4</strong>
  Here's the code:</p>
  
  <pre><code>&lt;?php
      include 'includes/phpConnection.php';
      if(!isset($_POST["submit"])) {
          $q = "SELECT * FROM members WHERE ID =".$_GET['id'];
          $result = mysql_query($q);
          $person = mysql_fetch_array($result);   
      }
  ?&gt;
  &lt;h1&gt;Edit A Member&lt;/h1&gt;
  &lt;form method='post' action= '&lt;?php echo $_SERVER['PHP_SELF']; ?&gt;'&gt;
      First Name&lt;input type = 'text' name= 'inputFName' value = '&lt;?php echo $person['FIRST_NAME']?&gt;'/&gt;
      First Last Name&lt;input type = 'text' name= 'inputLname' value = '&lt;?php echo $person['LAST_NAME']?&gt;'/&gt;
      Second Last Name&lt;input type = 'text' name= 'inputLname2' value = '&lt;?php echo $person['LAST_NAME2']?&gt;'/&gt;
      Date of Birth&lt;input type = 'date' name= 'inputDoB' value = '&lt;?php echo $person['DATE_OF_BIRTH']?&gt;'/&gt;
      relation&lt;input type = 'text' name= 'inputRelation' value = '&lt;?php echo $person['relation_to_me']?&gt;'/&gt;
      age&lt;input type = 'text' name = 'age' /&gt;
      &lt;input type="hidden" name = "id" value="&lt;?php echo $_GET['id'];?&gt;"/&gt;
      &lt;br /&gt;
      &lt;input type="submit" name="submit"/&gt;
  &lt;/form&gt;
  &lt;?php
      if(isset($_POST['submit'])){
          $u = "UPDATE members SET `FIRST_NAME`='$_POST[inputFName]',`LAST_NAME`='$_POST[inputLname]',`LAST_NAME2`='$_POST[inputLname2]',`DATE_OF_BIRTH`='$_POST[inputDoB]',`AGE`= '$_POST[age]',`relation_to_me`='$_POST[inputRelation]' WHERE ID =".$_POST['id'];
          mysql_query($u) or die(mysql_error());
      }
  ?&gt; 
  </code></pre>
  
  <p>please help</p>