Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialArthur Penteado
13,322 PointsUndefined index - Honeypot
Hi,
I'm getting this PHP "Notice: Undefined index" at this line:
if ($_POST['adress'] != "") {
echo "There was a problem with the information you entered";
exit;
}
Should i hide this PHP notifications or is there something wrong with the code?
I've already tried isset, but didn't work.
And sounds like a paradox, because it's supposed to be a empty variable. lol
Help!
3 Answers
Andrew Shook
31,709 PointsArthur, I noticed that you have $_POST['adress'] and not $_POST['address']. Check your form and make sure you are checking for the correct post variable.
Michael Escoto
30,028 PointsI think you might have misspelled "address".
Arthur Penteado
13,322 PointsOmg... That was the problem.
Thanks!
Michael Escoto
30,028 PointsMichael Escoto
30,028 PointsI think you might have misspelled "address".