lvlark Posted June 29, 2011 Share Posted June 29, 2011 Hello i've come into a bit of a problem, I have a dedicated server and i'm hosting a game off of it now the character registration page has an ugly error on it which says Notice: Undefined index: action in C:\xampp\htdocs\index.php on line 55 Not sure on how to fix this Any help is appreciated Thanks Mark Link to comment https://forums.phpfreaks.com/topic/240696-php-registration/ Share on other sites More sharing options...
trq Posted June 29, 2011 Share Posted June 29, 2011 This is a coding issue, nothing at all to do with php's configuration. Link to comment https://forums.phpfreaks.com/topic/240696-php-registration/#findComment-1236266 Share on other sites More sharing options...
floridaflatlander Posted June 29, 2011 Share Posted June 29, 2011 What's on or around line 55 on file index.php ? Link to comment https://forums.phpfreaks.com/topic/240696-php-registration/#findComment-1236268 Share on other sites More sharing options...
lvlark Posted June 29, 2011 Author Share Posted June 29, 2011 sorry for posting in the wrong forum heres around line 55 </td> </tr> </table> <br> <table width="350" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="center" bgcolor="white" style="border-bottom: solid 1px #cecece; border-top: solid 1px #cecece; border-left: solid 1px #cecece; border-right: solid 1px #cecece" class="padding_all"> <? if($_POST['action'])!=("signup") { ?> <form method="post" onSubmit="disabledBttn(this)" action="<?=$_SERVER[php_SELF]."?id=reg ".$_SERVER[QUERY_STRING]?>"> If you have skype add me on wowzer1011 Thanks Link to comment https://forums.phpfreaks.com/topic/240696-php-registration/#findComment-1236287 Share on other sites More sharing options...
trq Posted June 29, 2011 Share Posted June 29, 2011 Change: if($_POST['action'])!=("signup") to if(!isset($_POST['action']) || $_POST['action'] != "signup") Link to comment https://forums.phpfreaks.com/topic/240696-php-registration/#findComment-1236332 Share on other sites More sharing options...
lvlark Posted June 29, 2011 Author Share Posted June 29, 2011 Nothing changed upon changed that Link to comment https://forums.phpfreaks.com/topic/240696-php-registration/#findComment-1236347 Share on other sites More sharing options...
floridaflatlander Posted June 29, 2011 Share Posted June 29, 2011 Make sure everything is defined and put php after your <? to make it <?php Link to comment https://forums.phpfreaks.com/topic/240696-php-registration/#findComment-1236480 Share on other sites More sharing options...
OneEyedWillie Posted June 29, 2011 Share Posted June 29, 2011 Personally, I like to have a seperate page for processing my information. It seems to help me stay away from errors. For example, you would have your register.html where your form is. In the <form> tag, put register-exec.php (for example), and have all your php there. Then if all looks good in the registration put: header("location: members.php"); Just my personal preference. Link to comment https://forums.phpfreaks.com/topic/240696-php-registration/#findComment-1236609 Share on other sites More sharing options...
xyph Posted June 29, 2011 Share Posted June 29, 2011 thorpe - using OR will cause both conditions to be checked if( !isset($_POST['action']) || (isset($_POST['action']) && $_POST['action'] != "signup") ) The logic is a little complicated, and to fix that you should check if a variable is something, rather than isn't. Link to comment https://forums.phpfreaks.com/topic/240696-php-registration/#findComment-1236612 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.