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 4 of 4

Thread: When I...

  1. #1
    Join Date
    Sep 2006
    Location
    United Kingdom
    Posts
    667
    Tokens
    0

    Default When I...

    When I try to add an Image to a PHP File it comes up liek this.

    http://www.habbostudio.co.uk/uk/register.php

    Can any body help me out the code it:

    Code:
    <html>
    <head>
    <title>Register</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>
    <?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
    $username = $_POST[username];
    $password = $_POST[pass];
    $cpassword = $_POST[cpass];
    $email = $_POST[emai1];
    //the above lines set variables with the user submitted information
    if($username==NULL|$password==NULL|$cpassword==NULL|$email==NULL) {
    //checks to make sure no fields were left blank
    echo "A field was left blank.";
    }else{
    //none were left blank!  We continue...
    if($password != $cpassword) {
    // the passwords are not the same!  
    echo "Passwords do not match";
    }else{
    // the passwords are the same!  we continue...
    $password = md5($password);
    // encrypts the password
    $checkname = mysql_query("SELECT username FROM users WHERE username='$username'");
    $checkname= mysql_num_rows($checkname);
    $checkemail = mysql_query("SELECT email FROM users WHERE email='$email'");
    $checkemail = mysql_num_rows($checkemail);
    if ($checkemail>0|$checkname>0) {
    // oops...someone has already registered with that username or email!
    echo "The username or email is already in use";
    }else{
    // noone is using that email or username!  We continue...
    $username = htmlspecialchars($username);
    $password = htmlspecialchars($password);
    $email = htmlspecialchars($email);
    // 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) VALUES('$username','$password','$email')");
    // inserts the information into the database.
    echo "You have successfully registered!";
    }
    }
    }
    }
    else
    {
    // the form has not been submitted...so now we display it.
    echo ("
    <img src="userimages\pirates_group.gif" alt="Pirates" align="right" border="0">Members of HabboStudio are given the oppurtunity to use several features which are not available to guests. These features include, Studio-Mail, Your own gallery of badges which you can collect from attending regular HabboStudio events and Much Much More.
    There are plenty of other features which are top secret up until you become a member. Registration has been made nice, easy and completely free; just use the form below to create your username.
    <form method=\"POST\">
    Username<br>
    <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\"><br />
    Password<br>
    <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"pass\"><br />
    Confirm Password<br>
    <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"cpass\"><br />
    Email Adress:<br>
    <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"emai1\"><br />
    Habbo Username:<br>
    <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"habbo\"><br /><BR>
    <input name=\"register\" type=\"submit\" value=\"Register\">
    </form>
    ");
    }
    ?>

  2. #2
    Join Date
    Sep 2006
    Location
    Wakefield, West Yorkshire
    Posts
    162
    Tokens
    0

    Default

    try this

    Code:
    <html>
    <head>
    <title>Register</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>
    <?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
    $username = $_POST[username];
    $password = $_POST[pass];
    $cpassword = $_POST[cpass];
    $email = $_POST[emai1];
    //the above lines set variables with the user submitted information
    if($username==NULL|$password==NULL|$cpassword==NULL|$email==NULL) {
    //checks to make sure no fields were left blank
    echo "A field was left blank.";
    }else{
    //none were left blank!  We continue...
    if($password != $cpassword) {
    // the passwords are not the same!  
    echo "Passwords do not match";
    }else{
    // the passwords are the same!  we continue...
    $password = md5($password);
    // encrypts the password
    $checkname = mysql_query("SELECT username FROM users WHERE username='$username'");
    $checkname= mysql_num_rows($checkname);
    $checkemail = mysql_query("SELECT email FROM users WHERE email='$email'");
    $checkemail = mysql_num_rows($checkemail);
    if ($checkemail>0|$checkname>0) {
    // oops...someone has already registered with that username or email!
    echo "The username or email is already in use";
    }else{
    // noone is using that email or username!  We continue...
    $username = htmlspecialchars($username);
    $password = htmlspecialchars($password);
    $email = htmlspecialchars($email);
    // 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) VALUES('$username','$password','$email')");
    // inserts the information into the database.
    echo "You have successfully registered!";
    }
    }
    }
    }
    else
    {
    ?>
    <img src="userimages\pirates_group.gif" alt="Pirates" align="right" border="0">Members of HabboStudio are given the oppurtunity to use several features which are not available to guests. These features include, Studio-Mail, Your own gallery of badges which you can collect from attending regular HabboStudio events and Much Much More.
    There are plenty of other features which are top secret up until you become a member. Registration has been made nice, easy and completely free; just use the form below to create your username.
    <form method=\"POST\">
    Username<br>
    <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"username\"><br />
    Password<br>
    <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"pass\"><br />
    Confirm Password<br>
    <input type=\"password\" size=\"15\" maxlength=\"25\" name=\"cpass\"><br />
    Email Adress:<br>
    <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"emai1\"><br />
    Habbo Username:<br>
    <input type=\"text\" size=\"15\" maxlength=\"25\" name=\"habbo\"><br /><BR>
    <input name=\"register\" type=\"submit\" value=\"Register\">
    </form>
    <?php
    }
    ?>
    Last edited by -1.; 18-11-2006 at 07:05 PM.
    Left. Or have I?

  3. #3
    Join Date
    Sep 2006
    Location
    United Kingdom
    Posts
    667
    Tokens
    0

    Default

    Thanks Ill +rep you

    EDIT: Its not showing the register "button"
    Last edited by Panther; 18-11-2006 at 07:12 PM.

  4. #4
    Join Date
    Sep 2006
    Location
    Wakefield, West Yorkshire
    Posts
    162
    Tokens
    0

    Default

    Change the HTML bit to

    HTML Code:
    <form method="POST">
    Username<br>
    <input type="text" size="15" maxlength="25" name="username"><br />
    Password<br>
    <input type="password" size="15" maxlength="25" name="pass"><br />
    Confirm Password<br>
    <input type="password" size="15" maxlength="25" name="cpass"><br />
    Email Adress:<br>
    <input type="text" size="15" maxlength="25" name="emai1"><br />
    Habbo Username:<br>
    <input type="text" size="15" maxlength="25" name="habbo"><br /><BR>
    <input name="register" type="submit" value="Register">
    </form>
    try that.
    Left. Or have I?

Posting Permissions

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