Have an account? Sign in
Login  Register  Facebook
This Page is Under Construction! - If You Want To Help Please Send your CV - Advanced Web Core (BETA)
Quick Table of Contents
[Edit] Notice: Undefined Index
This notice means that a global or superglobal variable has not been set in your PHP before you attempted to script with it. Meaning you have to see first if that variable is set or ready for use in the script. If you are building a form all you have to do is see that one of the form's $_POST variables isset() before gathering the variables up into local PHP variables. Simply trying to place a $_POST[''] type variable in your script without seeing if it is set first, will render this Notice in many PHP environments. Some environments will not render this error depending on the PHP configuration on the server.

How can i fix it

Before trying to access certain variables or globals make sure that one in the group is set first... then script your heart out using those variables. Use the isset() PHP function.
if (isset($_POST["submit"])) { 

    $button = $_POST["submit"]; 
    $uname = $_POST["name"]; 
    $uemail = $_POST["email"];

}
August 29, 2011