php - Notice: Undefined index: intakeid -


i trying since last hour update database using php unable update.

i error

notice: undefined index: intakeid in c:\wamp\www\multi_edit\edit_save.php on line 3.

<?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 < $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]'                                              intakeid='$intakeid[$i]`enter code here`'")or die(mysql_error()); } error_reporting(e_all); ini_set("display_errors", 5); ?> 

its best method check $_post['value'] variable has value set or not using isset() function , otherwise notices have already. check


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -