Undefined index error [closed]
i am trying to Post something but keep getting Undefined index error. I have encountered this problem before and using if(isset($_POST['in_come']) solved my previous problem. But, now it does not. What can cause this problem? Everything seems correct.Html posts an input and php should have gotten it Thanks
The problem is caused by you trying to access an array index that doesn't exist. E.g:
$foo = array('bar');
echo $foo[99999];
That means you have a logic error somewhere in your code.
This error is caused by passing an invalid index to an array, whether it be a string or integer index. Using if(isset($_POST['in_come'])
should return false if it doesn't exist though, and not throw an error. If you would post your code, people could be more helpful
精彩评论