pedrobcabral Posted February 11, 2007 Share Posted February 11, 2007 I want to evaluate a form in the same page where it is. I'm using sometinhg like <?php if ($_POST['variable']) someting; ?> The problem is I'm getting the followind error: PHP Notice: Undefined index: utilizador in /Applications/MAMP/htdocs/registo.php on line x Does anyonw knows why? Thank you. Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 11, 2007 Share Posted February 11, 2007 The the variable wasn't posted. Use if(isset($_POST['variable'])){ //something }else{ //something else. } Quote Link to comment Share on other sites More sharing options...
Yesideez Posted February 11, 2007 Share Posted February 11, 2007 "something" needs to be contained in swirly brackets: <?php if ($_POST['variable']) {someting;} ?> Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 11, 2007 Share Posted February 11, 2007 Yesi: Not if it's only one line. That's not the issue here. It is good practice to always use braces though. Quote Link to comment Share on other sites More sharing options...
pedrobcabral Posted February 11, 2007 Author Share Posted February 11, 2007 one hour around this ARGHH. thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.