Jump to content

php registration


lvlark

Recommended Posts

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

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 :D

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/240696-php-registration/#findComment-1236287
Share on other sites

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.