title: Notice: Undefined index: intakeid
body: <p>I am trying since last hour to update my database using php but unable to update.</p>
  
  <p>I get the error</p>
  
  <blockquote>
    <p>Notice: Undefined index: intakeid in C:\wamp\www\Multi_Edit\edit_save.php on line 3. </p>
  </blockquote>
  
  <pre><code>&lt;?php
  include('dbcon.php');
  $intakeid=$_POST['intakeid'];
  $firstname=$_POST['firstname'];
  $lastname=$_POST['lastname'];
  $password=$_POST['password'];
  $confirmpassword=$_POST['confirmpassword'];
  $homeaddress=$_POST['homeaddress'];
  $email=$_POST['email'];
  
  $N = count($intakeid);
  for($i=0; $i &lt; $N; $i++)
  {
      $result = mysql_query("UPDATE registration SET firstname='$firstname[$i]',
                                                     lastname='$lastname[$i]',
                                                     password='$password[$i]',
                                                     confirmpassword='$confirmpassword[$i]',
                                                     homeaddress='$homeaddress[$i]',
                                                     email='$email[$i]'
                                               WHERE intakeid='$intakeid[$i]`enter code here`'")or die(mysql_error());
  }
  error_reporting(E_ALL);
  ini_set("display_errors", 5);
  ?&gt;
  </code></pre>