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

Thread: Where to start?

  1. #1
    Join Date
    Oct 2006
    Location
    Sunny Sussex (England)
    Posts
    101
    Tokens
    0

    Default Where to start?

    I'm looking to get better at PHP And HTML, and also learn a few new things,including how to code a layout etc

    Are there any good websites for these sort of things?

    Thanks,

    Sam

  2. #2
    Join Date
    Sep 2005
    Location
    East London
    Posts
    3,028
    Tokens
    0

    Latest Awards:

    Default

    A good way to improve your php/html is looking at other peoples scripts.

    a site like www.atomicoxide.co.uk or www.hotscripts.com would provide you with these scripts.

    What u do is look for what it does in the script.

    So if it checks if user level = admin look for something like
    PHP Code:
    if ($user_level == 7
    or w/e

  3. #3
    Join Date
    Feb 2006
    Location
    Ontario Canada
    Posts
    4,587
    Tokens
    0

    Latest Awards:

    Default

    pixel2life.com but dont copy the tutorials learn from them

    .:.:#14:.:. .:.: Impossible Is Nothing :.:. .:.: 845 Rep:.:.
    .:.: Stand up for what is right, even if you stand alone:.:.


  4. #4
    Join Date
    Oct 2006
    Location
    UK
    Posts
    166
    Tokens
    0

    Default

    Make a HTML page like this
    HTML Code:
    <form method="post" action="habboxmods.php">Do you like Habbox Mods?<br><input type="text" size="3" name="mods"><br><input type="submit" name="submit" value="Submit"></form>
    Then make a file called habboxmods.php with this in
    PHP Code:
    <?
    $mods 
    "$_POST[mods]";
    if (
    $mods == "yes") {
    echo 
    "How dare you";
    }
    elseif (
    $mods == "no") {
    echo 
    "Go you!";
    }
    ?>
    Now the PHP File Breakdown

    PHP Code:
    <?
    That begins the PHP File

    PHP Code:
    $mods "$_POST[mods]"
    The $mods part makes the line a variable, so you don't have to keep typing $_POST.... all the time. The $_POST[mods] part gets the textbox called mods from the form on the html page

    PHP Code:
    if ($mods == "yes") { 
    That line is basically saying, if you have typed yes in the form box it will show How dare you! as shown here
    PHP Code:
    echo "How dare you"
    Under that there is
    PHP Code:

    which ends the else statement.

    PHP Code:
    elseif ($mods == "no") { 
    That is saying if you haven't typed yes in the box, check if you have typed no. If you have then
    PHP Code:
    echo "Go you!"
    Then
    PHP Code:
    }
    ?> 
    that ends the elseif statement and closes the PHP file.

    Basic tutorial
    Last edited by George Morgan; 28-10-2006 at 03:19 PM.

  5. #5
    Join Date
    Sep 2005
    Posts
    150
    Tokens
    0

  6. #6
    Join Date
    Mar 2006
    Location
    Scotland
    Posts
    1,012
    Tokens
    175

    Latest Awards:

    Default

    Quote Originally Posted by George Morgan View Post
    Make a HTML page like this
    HTML Code:
    <form method="post" action="habboxmods.php">Do you like Habbox Mods?<br><input type="text" size="3" name="mods"><br><input type="submit" name="submit" value="Submit"></form>
    Then make a file called habboxmods.php with this in
    PHP Code:
    <?
    $mods 
    "$_POST[mods]";
    if (
    $mods == "yes") {
    echo 
    "How dare you";
    }
    elseif (
    $mods == "no") {
    echo 
    "Go you!";
    }
    ?>
    Now the PHP File Breakdown

    PHP Code:
    <?
    That begins the PHP File

    PHP Code:
    $mods "$_POST[mods]"
    The $mods part makes the line a variable, so you don't have to keep typing $_POST.... all the time. The $_POST[mods] part gets the textbox called mods from the form on the html page

    PHP Code:
    if ($mods == "yes") { 
    That line is basically saying, if you have typed yes in the form box it will show How dare you! as shown here
    PHP Code:
    echo "How dare you"
    Under that there is
    PHP Code:

    which ends the else statement.

    PHP Code:
    elseif ($mods == "no") { 
    That is saying if you haven't typed yes in the box, check if you have typed no. If you have then
    PHP Code:
    echo "Go you!"
    Then
    PHP Code:
    }
    ?> 
    that ends the elseif statement and closes the PHP file.

    Basic tutorial
    One problem with that. Its case sensitive so if you post Yes or No it'll stay blank.


    You don't like me
    Chances are I don't like you.

Posting Permissions

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