PHP ERROR Please help! thanks?

dalton metzler

New member
This is my error

Notice: Undefined index: submit in C:\xampp\htdocs\kramansro\register.php on line 4

Notice: Undefined index: email in C:\xampp\htdocs\kramansro\register.php on line 6

Notice: Undefined index: username in C:\xampp\htdocs\kramansro\register.php on line 7

Notice: Undefined index: password in C:\xampp\htdocs\kramansro\register.php on line 8

Notice: Undefined index: repeatpassword in C:\xampp\htdocs\kramansro\register.php on line 9

This is my code

http://pastebin.com/c1qUnC3t

PLEASE HELP!
 
It looks for the values of "submit", "email", etc. which are not available yet if you just loaded the page. Try placing the code above into the earlier part of "register.php", there it will check for the details. If ever it detects a wrong detail input, just make it go back to the register page.
 
Line 75, your name attribute is malformed. It should be name="submit".

And also use isset() along with an if statement to check if the POST index is set, example:
if (isset($_POST['your index'])) {
//do something
}

This should clean out most of the errors you see.
 
Back
Top