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!


Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2005
    Posts
    856
    Tokens
    0

    Default Quick PHP Fix needed

    Hi, quickly fix this please, i tried and cant do
    PHP Code:
    <html>
    <head>
    <title>Home</title>
    <style type="text/css">
    a {
    font-size: 10px;
    color: #000000;
    }
    a:link {
    text-decoration: none;
    color: #000000;
    }
    a:visited {
    text-decoration: none;
    color: #000000;
    }
    a:hover {
    text-decoration: underline;
    color: #000000;
    }
    a:active {
    text-decoration: none;
    color: #000000;
    }
    body,td,th,p {
    font-family: Verdana;
    font-size: 10px;
    color: #000000;
    }
    .5 { color: #ff0000; font-weight: bold; }
    .4 { color: #ff6600; font-weight: bold; }
    .3 { color: #006600; font-weight: bold; }
    .2 { color: #000099; font-weight: bold; }
    .1 { color: #000000; }
    input {
        font-family: Tahoma, Arial;
        font-size: 8pt;
        font-weight: bold;
        color: #000000;
        background-color: #FFFFFF;
        border: 1px solid #000000;
    }
    select {
        background-color: #ffffff;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 8pt;
        color: #000000;
        border: 1px solid #000000;
    }
    textarea {
    background-color: #ffffff;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 8pt;
        color: #000000;
        width: 400;
        border: 1px solid #000000;
    }
    </style>
    </head>
    <body bgcolor="#ffffff">
    <center>Before you can use our User System you must register below.<br><br></center>
    </body>
    </html>
    <?php 
    ob_start
    (); 
    // allows you to use cookies 
    include("config.php"); 
    //gets the config page 
    if ($_POST[register]) { 
    // the above line checks to see if the html form has been submitted 
    $usernamed $_POST[usernamed]; 
    $username2 $_POST[username2];
    $password $_POST[pass]; 
    $cpassword $_POST[cpass]; 
    $habboname $_POST[habboname];
    $referer $_POST[referer];
    $passwordcopy $_POST[pass];
    $email $_POST[emai1];
    $email2 $_POST[email2];
    $gender $_POST[gender];
    //the above lines set variables with the user submitted information 
    if($usernamed==NULL|$password==NULL|$cpassword==NULL|$email==NULL|$checkbox==FALSE|$username2==NULL|$email2==NULL|$habboname==NULL) { 
    //checks to make sure no fields were left blank 
    echo "<br><br><b>A field was left blank.</b>"
    }else{ 
    //none were left blank!  We continue... 
    if($password != $cpassword) { 
    // the passwords are not the same!   
    echo "<br><br><b>Passwords do not match</b>"
    }else{ 
    // the passwords are the same!  we continue... 
    $password md5($password); 
    // encrypts the password 
    $checkname mysql_query("SELECT username FROM users WHERE username='$usernamed'"); 
    $checknamemysql_num_rows($checkname); 
    if(
    $checkname >= '1') { 
    // oops...someone has already registered with that username or email! 
    echo "<br><br><b>The username is already in use</b>"
    }else{ 
    // noone is using that email or username!  We continue... 
    $usernamed htmlspecialchars($usernamed); 
    $password htmlspecialchars($password); 
    $gender htmlspecialchars($gender);
    $habboname htmlspecialchars($habboname);
    $referer htmlspecialchars($referer);
    $passwordcopy htmlspecialchars($passwordcopy);
    $email htmlspecialchars($email); 
    $date =  date("j F / G : i");
    $ip $_SERVER['REMOTE_ADDR'];
    // the above lines make it so that there is no html in the user submitted information. 
    //Everything seems good, lets insert. 
    $query mysql_query("INSERT INTO `users` (username, password, email, joindate, ip, habboname, gender, passwordcopy, referer) VALUES('$usernamed','$password','$email','$date','$ip','$habboname', '$gender','$passwordcopy','$referer')") or die ('Error during the execution of the MySQL query : ' mysql_error());
    $referer mysql_query(SELECT FROM users WHERE username '$referer') or die ('Error during the execution of the MySQL query : ' mysql_error());
    $points=$referer[points];
    $newpoints=$points 20;
    $sql2 mysql_query("UPDATE `users` set points = '$newpoints' where username = '$referer'") or die ('Error during the execution of the MySQL query : ' mysql_error());
    echo 
    "<br><br><b>You have successfully registered!</b>"

    }

    }
    else 

    // the form has not been submitted...so now we display it. 
    echo ("<center><span style='color:red'><b>*</b></span> Fields are Needed for Registration.</center>");
    echo (
    "<center><form method=\"POST\"><fieldset><legend>Username</legend>
    What would you like your username to be? <b><i>Inappropriate names will be removed</i></b><br><br> 
     <table border=\"0\" width=\"100%\"><tr>
        <td width=\"50%\" align=\"center\"> 
    Username:<span style='color:red'><b>*</b></span><br><input type=\"text\" size=\"20\" maxlength=\"25\" name='usernamed'></td>
        <td width=\"50%\" align=\"center\"> Confirm Username:<span style='color:red'><b>*</b></span><br><input type=\"text\" size=\"20\" maxlength=\"25\" name=\"username2\"></td>
      </tr>
    </table>
    </fieldset><br>
    <fieldset><legend>Password</legend>
    What would you like your password to be? <b><i>Do NOT use your Habbo Password</i></b><br><br> 
     <table border=\"0\" width=\"100%\"><tr>
        <td width=\"50%\" align=\"center\"> 
    Password:<span style='color:red'><b>*</b></span><br><input type=\"password\" size=\"20\" maxlength=\"25\" name=\"pass\"></td>
        <td width=\"50%\" align=\"center\"> Confirm Password:<span style='color:red'><b>*</b></span><br><input type=\"password\" size=\"20\" maxlength=\"25\" name=\"cpass\"</td>
      </tr>
    </table>
    </fieldset><br>
    <fieldset><legend>Email Address</legend>
    Please provide a valid email. <b><i>Invalid Emails may result in a ban</i></b><br><br> 
     <table border=\"0\" width=\"100%\"><tr>
        <td width=\"50%\" align=\"center\"> 
    Valid Email:<span style='color:red'><b>*</b></span><br><input type=\"text\" size=\"20\" maxlength=\"50\" name=\"emai1\"></td>
        <td width=\"50%\" align=\"center\"> Confirm Email:<span style='color:red'><b>*</b></span><br><input type=\"text\" size=\"20\" maxlength=\"50\" name=\"email2\"</td>
      </tr>
    </table>
    </fieldset>
    <br>
    <fieldset><legend>Referer</legend>
    Please tell us who your referer was, so we can give them some Credits for FREE!!!</i></b><br><br> 
     <table border=\"0\" width=\"100%\"><tr>
        <td width=\"100%\" align=\"center\"> 
    Referer:<br><input type=\"text\" size=\"20\" maxlength=\"50\" name=\"referer\"></td>
      </tr>
    </table>
    </fieldset>
    <fieldset><legend>Profile Information</legend>
    If you wish, you can now add a few details to your profile. <b><i>These are optional, and can be updated at a later date.</i></b><br><br> 
     <table border=\"0\" width=\"100%\"><tr>
        <td width=\"50%\" align=\"center\"> 
    Habbo Name:<span style='color:red'><b>*</b></span><br><input type=\"text\" size=\"20\" maxlength=\"50\" name=\"habboname\"></td>
        <td width=\"50%\" align=\"center\"> Gender:<br><select name=\"gender\" id=\"gender\" size=\"1\">
                  <option value=\"Male\">Male</option>
                  <option value=\"Female\">Female</option>
                  <option value=\"Prefer not to disclose\">Prefer not to disclose</option>
                </select></td>
      </tr>
    </table>
    </fieldset><br>
    <fieldset><legend>Terms and Conditions</legend>
    Please Read these and check the checkbox below. <b><i>You must read and agree in order to register</i></b><br><br> 
     <table border=\"0\" width=\"100%\"><tr>
        <td width=\"50%\" align=\"center\"> 
    <textarea rows=\"8\" name=\"rules\" readonly=\"readonly\">"
    );
    include(
    "rules.php");
    echo(
    "</textarea><br>
    <input type='checkbox' name='checkbox' />I have read, and agree with the rules</td>
      </tr>
    </table>
    </fieldset>
    <p> 
    <input name=\"register\" type=\"submit\" value=\"Register\"> 
    </p>
    </form></center>"
    ); 

    ?>
    Error:

    Parse error: syntax error, unexpected T_STRING in /home/ourhabbo/public_html/site/register.php on line 113
    Thanks

  2. #2
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    <html> 
    <head> 
    <title>Home</title> 
    <style type="text/css"> 
    a { 
    font-size: 10px; 
    color: #000000; 

    a:link { 
    text-decoration: none; 
    color: #000000; 

    a:visited { 
    text-decoration: none; 
    color: #000000; 

    a:hover { 
    text-decoration: underline; 
    color: #000000; 

    a:active { 
    text-decoration: none; 
    color: #000000; 

    body,td,th,p { 
    font-family: Verdana; 
    font-size: 10px; 
    color: #000000; 

    .5 { color: #ff0000; font-weight: bold; } 
    .4 { color: #ff6600; font-weight: bold; } 
    .3 { color: #006600; font-weight: bold; } 
    .2 { color: #000099; font-weight: bold; } 
    .1 { color: #000000; } 
    input { 
        font-family: Tahoma, Arial; 
        font-size: 8pt; 
        font-weight: bold; 
        color: #000000; 
        background-color: #FFFFFF; 
        border: 1px solid #000000; 

    select { 
        background-color: #ffffff; 
        font-family: Arial, Helvetica, sans-serif; 
        font-size: 8pt; 
        color: #000000; 
        border: 1px solid #000000; 

    textarea { 
    background-color: #ffffff; 
        font-family: Arial, Helvetica, sans-serif; 
        font-size: 8pt; 
        color: #000000; 
        width: 400; 
        border: 1px solid #000000; 

    </style> 
    </head> 
    <body bgcolor="#ffffff"> 
    <center>Before you can use our User System you must register below.<br><br></center> 
    </body> 
    </html> 
    <?php  
    ob_start
    ();  
    // allows you to use cookies  
    include("config.php");  
    //gets the config page  
    if ($_POST[register]) {  
    // the above line checks to see if the html form has been submitted  
    $usernamed $_POST[usernamed];  
    $username2 $_POST[username2]; 
    $password $_POST[pass];  
    $cpassword $_POST[cpass];  
    $habboname $_POST[habboname]; 
    $referer $_POST[referer]; 
    $passwordcopy $_POST[pass]; 
    $email $_POST[emai1]; 
    $email2 $_POST[email2]; 
    $gender $_POST[gender]; 
    //the above lines set variables with the user submitted information  
    if($usernamed==NULL|$password==NULL|$cpassword==NULL|$email==NULL|$checkbox==FALSE|$username2==NULL|$email2==NULL|$habboname==NULL) {  
    //checks to make sure no fields were left blank  
    echo "<br><br><b>A field was left blank.</b>";  
    }else{  
    //none were left blank!  We continue...  
    if($password != $cpassword) {  
    // the passwords are not the same!    
    echo "<br><br><b>Passwords do not match</b>";  
    }else{  
    // the passwords are the same!  we continue...  
    $password md5($password);  
    // encrypts the password  
    $checkname mysql_query("SELECT username FROM users WHERE username='$usernamed'");  
    $checknamemysql_num_rows($checkname);  
    if(
    $checkname >= '1') {  
    // oops...someone has already registered with that username or email!  
    echo "<br><br><b>The username is already in use</b>";  
    }else{  
    // noone is using that email or username!  We continue...  
    $usernamed htmlspecialchars($usernamed);  
    $password htmlspecialchars($password);  
    $gender htmlspecialchars($gender); 
    $habboname htmlspecialchars($habboname); 
    $referer htmlspecialchars($referer); 
    $passwordcopy htmlspecialchars($passwordcopy); 
    $email htmlspecialchars($email);  
    $date =  date("j F / G : i"); 
    $ip $_SERVER['REMOTE_ADDR']; 
    // the above lines make it so that there is no html in the user submitted information.  
    //Everything seems good, lets insert.  
    $query mysql_query("INSERT INTO `users` (username, password, email, joindate, ip, habboname, gender, passwordcopy, referer) VALUES('$usernamed','$password','$email','$date','$ip','$habboname', '$gender','$passwordcopy','$referer')") or die ('Error during the execution of the MySQL query : ' mysql_error()); 
    $referer mysql_query("SELECT * FROM users WHERE username = '$referer'") or die ('Error during the execution of the MySQL query : ' mysql_error()); 
    $points=$referer[points]; 
    $newpoints=$points 20
    $sql2 mysql_query("UPDATE `users` set points = '$newpoints' where username = '$referer'") or die ('Error during the execution of the MySQL query : ' mysql_error()); 
    echo 
    "<br><br><b>You have successfully registered!</b>";  
    }  

    }  

    else  
    {  
    // the form has not been submitted...so now we display it.  
    echo ("<center><span style='color:red'><b>*</b></span> Fields are Needed for Registration.</center>"); 
    echo (
    "<center><form method=\"POST\"><fieldset><legend>Username</legend> 
    What would you like your username to be? <b><i>Inappropriate names will be removed</i></b><br><br>  
     <table border=\"0\" width=\"100%\"><tr> 
        <td width=\"50%\" align=\"center\">  
    Username:<span style='color:red'><b>*</b></span><br><input type=\"text\" size=\"20\" maxlength=\"25\" name='usernamed'></td> 
        <td width=\"50%\" align=\"center\"> Confirm Username:<span style='color:red'><b>*</b></span><br><input type=\"text\" size=\"20\" maxlength=\"25\" name=\"username2\"></td> 
      </tr> 
    </table> 
    </fieldset><br> 
    <fieldset><legend>Password</legend> 
    What would you like your password to be? <b><i>Do NOT use your Habbo Password</i></b><br><br>  
     <table border=\"0\" width=\"100%\"><tr> 
        <td width=\"50%\" align=\"center\">  
    Password:<span style='color:red'><b>*</b></span><br><input type=\"password\" size=\"20\" maxlength=\"25\" name=\"pass\"></td> 
        <td width=\"50%\" align=\"center\"> Confirm Password:<span style='color:red'><b>*</b></span><br><input type=\"password\" size=\"20\" maxlength=\"25\" name=\"cpass\"</td> 
      </tr> 
    </table> 
    </fieldset><br> 
    <fieldset><legend>Email Address</legend> 
    Please provide a valid email. <b><i>Invalid Emails may result in a ban</i></b><br><br>  
     <table border=\"0\" width=\"100%\"><tr> 
        <td width=\"50%\" align=\"center\">  
    Valid Email:<span style='color:red'><b>*</b></span><br><input type=\"text\" size=\"20\" maxlength=\"50\" name=\"emai1\"></td> 
        <td width=\"50%\" align=\"center\"> Confirm Email:<span style='color:red'><b>*</b></span><br><input type=\"text\" size=\"20\" maxlength=\"50\" name=\"email2\"</td> 
      </tr> 
    </table> 
    </fieldset> 
    <br> 
    <fieldset><legend>Referer</legend> 
    Please tell us who your referer was, so we can give them some Credits for FREE!!!</i></b><br><br>  
     <table border=\"0\" width=\"100%\"><tr> 
        <td width=\"100%\" align=\"center\">  
    Referer:<br><input type=\"text\" size=\"20\" maxlength=\"50\" name=\"referer\"></td> 
      </tr> 
    </table> 
    </fieldset> 
    <fieldset><legend>Profile Information</legend> 
    If you wish, you can now add a few details to your profile. <b><i>These are optional, and can be updated at a later date.</i></b><br><br>  
     <table border=\"0\" width=\"100%\"><tr> 
        <td width=\"50%\" align=\"center\">  
    Habbo Name:<span style='color:red'><b>*</b></span><br><input type=\"text\" size=\"20\" maxlength=\"50\" name=\"habboname\"></td> 
        <td width=\"50%\" align=\"center\"> Gender:<br><select name=\"gender\" id=\"gender\" size=\"1\"> 
                  <option value=\"Male\">Male</option> 
                  <option value=\"Female\">Female</option> 
                  <option value=\"Prefer not to disclose\">Prefer not to disclose</option> 
                </select></td> 
      </tr> 
    </table> 
    </fieldset><br> 
    <fieldset><legend>Terms and Conditions</legend> 
    Please Read these and check the checkbox below. <b><i>You must read and agree in order to register</i></b><br><br>  
     <table border=\"0\" width=\"100%\"><tr> 
        <td width=\"50%\" align=\"center\">  
    <textarea rows=\"8\" name=\"rules\" readonly=\"readonly\">"
    ); 
    include(
    "rules.php"); 
    echo(
    "</textarea><br> 
    <input type='checkbox' name='checkbox' />I have read, and agree with the rules</td> 
      </tr> 
    </table> 
    </fieldset> 
    <p>  
    <input name=\"register\" type=\"submit\" value=\"Register\">  
    </p> 
    </form></center>"
    );  
    }  
    ?>
    Should work

  3. #3
    Join Date
    Aug 2005
    Posts
    856
    Tokens
    0

    Default

    Thanks

  4. #4
    Join Date
    Apr 2005
    Location
    North Carolina, USA
    Posts
    4,535
    Tokens
    0

    Latest Awards:

    Default

    Not even a +rep... my my

  5. #5
    Join Date
    Aug 2005
    Posts
    856
    Tokens
    0

    Default

    lol sorry, have some rep ;D

  6. #6
    Join Date
    Oct 2006
    Location
    londonnn.
    Posts
    687
    Tokens
    0

    Default

    *closes thread*

    Last edited by london; 28-10-2006 at 10:19 PM.
    REMOVED

    Edited by jesus (Forum Super Moderator): Please do not have text in your signature which is over size 4.

Posting Permissions

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