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 Quote 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. Quote 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 ? Quote 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 Quote 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") Quote 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 Quote 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 Quote 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. Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/240696-php-registration/#findComment-1236612 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.