Jump to content

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


poqoz-87

Recommended Posts

can someone tell me what does this error means? n how can i solve it?

 

this the error that i m referring to:

 

PHP Notice: Undefined index: gender in C:\Inetpub\wwwroot\done-all-de-steps\Untitled-6-1n2n3n4nbannern7err.php on line 112

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.