Jump to content

[SOLVED] what does this error(PHP Notice: Undefined index) means? help plz


Recommended Posts

From my experience this is because your trying to use a variable before it is defined. I have gotten this when verifying form submission. e.g.

<?php
if(!$_POST['submit']){
  //form is not submitted so show the form

}
else
{
  //process the form here because it has been submitted.
}
?>

 

My solution... maybe not the best, but it worked.

 

Set the error reporting a little higher in php.ini. right now it is probably set to E_ALL or E_NOTICE. Try setting it to E_WARNING or E_ERROR and you should see that notice go away.

 

regards,

 

Nate

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.