Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: PHP Start

  1. #21
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default

    The line before is: else { The line before that has a ';'.


    Selling DJ/Habbo layout, more info here.


  2. #22
    Join Date
    Nov 2006
    Location
    Cheshire.
    Posts
    730
    Tokens
    250

    Default

    You've not closed something. Like an echo("");


    Give us an add like!

  3. #23
    Join Date
    Apr 2007
    Location
    england
    Posts
    536
    Tokens
    0

    Default

    Heres my entire code.

    PHP Code:
    <?php
    if(!$_POST['this']){
    echo(
    "
    Please use this form to register...<br>
    <form method=\"POST\">
    <table width=300><tr><td width=\"200\">Username:</td>
    <td><input type=\"text\" name=\"username\"></td></tr>

    <tr><td width=\"200\">Password:</td>
    <td><input type=\"text\" name=\"password\"></td></tr>

    <tr><td width=\"200\">Confirm Password:</td>
    <td><input type=\"text\" name=\"cpassword\"></td></tr>

    <tr><td width=\"200\">Email</td>
    <td><input type=\"text\" name=\"email\"></td></tr>

    <tr><td width=\"200\">Username:</td>
    <td><input type=\"text\" name=\"username\"></td></tr><tr>

    <tr><td width=\"200\">Age:</td>
    <td><input type=\"text\" name=\"age\"></td></tr>

    <tr><td width=\"200\"></td><td><input type=\"submit\" name=\"this\" value=\"register\"></td></tr></table>
    </form>"
    );}
    else{
    $username $_POST['username'];
    $password =$_POST['password'];
    $password=md5($password);
    $cpassword =$_POST['cpassword'];
    $cpassword=md5($cpassword);
    $age $_POST['age'];
    $email $_POST['email'];
    $cemail $_POST['cemail'];
    if(
    $password != $cpassword){
    echo(
    "The Two passwords didnt match..."); exit; 
    }
    if (
    $age <= 13) {{
    echo(
    "Your not old enough to join."); exit; 
    }

    if(
    $email != $cemail){
    echo(
    "The two emails didnt match..."); exit; 
    }

    else {
    echo(
    "You have now singed up as <b>$username!</b> You can log in by clicking <a href='login.php'>here.</a>")
    $query mysql_query("INSERT INTO `system` (`username`, `password`, `age`) VALUES ('$username', '$password', '$age'");  
    echo(
    "You have suscssfully registered $username");
    }
    }
    ?>


    Selling DJ/Habbo layout, more info here.


  4. #24
    Join Date
    Nov 2006
    Location
    Cheshire.
    Posts
    730
    Tokens
    250

    Default

    PHP Code:
    <?php
    if(!$_POST['this']){
    echo(
    "
    Please use this form to register...<br>
    <form method=\"POST\">
    <table width=300><tr><td width=\"200\">Username:</td>
    <td><input type=\"text\" name=\"username\"></td></tr>

    <tr><td width=\"200\">Password:</td>
    <td><input type=\"text\" name=\"password\"></td></tr>

    <tr><td width=\"200\">Confirm Password:</td>
    <td><input type=\"text\" name=\"cpassword\"></td></tr>

    <tr><td width=\"200\">Email</td>
    <td><input type=\"text\" name=\"email\"></td></tr>

    <tr><td width=\"200\">Username:</td>
    <td><input type=\"text\" name=\"username\"></td></tr><tr>

    <tr><td width=\"200\">Age:</td>
    <td><input type=\"text\" name=\"age\"></td></tr>

    <tr><td width=\"200\"></td><td><input type=\"submit\" name=\"this\" value=\"register\"></td></tr></table>
    </form>"
    );}
    else{
    $username $_POST['username'];
    $password =$_POST['password'];
    $password=md5($password);
    $cpassword =$_POST['cpassword'];
    $cpassword=md5($cpassword);
    $age $_POST['age'];
    $email $_POST['email'];
    $cemail $_POST['cemail'];
    if(
    $password != $cpassword){
    echo(
    "The Two passwords didnt match..."); exit; 
    }
    if (
    $age <= 13) {{
    echo(
    "Your not old enough to join."); exit; 
    }

    if(
    $email != $cemail){
    echo(
    "The two emails didnt match..."); exit; 
    }

    else {
    echo(
    "You have now singed up as <b>$username!</b> You can log in by clicking <a href='login.php'>here.</a>");
    $query mysql_query("INSERT INTO `system` (`username`, `password`, `age`) VALUES ('$username', '$password', '$age'");  
    echo(
    "You have suscssfully registered $username");
    }
    }
    ?>
    You forgot to put the ';' at the end of the echo


    Give us an add like!

Page 3 of 3 FirstFirst 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •