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
  1. #1
    Join Date
    Aug 2004
    Location
    Over there. ^_^
    Posts
    1,100
    Tokens
    0

    Latest Awards:

    Default PHP Form Tutorial

    This tutorial is going to explain how to allow people submit forms, without opening there email (Hotmail,Outlook, etc..)
    First of all you are going to need a Form like this for example:
    Code:
    <form name="form1" id="form1" method="post" action="confirm.php">
    Name:<input type="text" name="Name">
    E-mail:<input type="text" name="E-Mail">
    Reason:<select name="Reason">
    <option selected>- Choose a Reason</option>
    <option>// - - - - - - - - - - -</option>
    <option>Your Option 1</option>
    <option>Your Option 2</option>
    <option>Your Option 3</option>
    <option>Your Option 4</option>
    <option>- - - - - - - - - - - \\</option></select>
    Message: <textarea name="message" rows="4" cols="30"></textarea>
    URL of File*: <input name="url" type="text" value="http://">
    <input name="Send" type="submit" id="Send" value="Send">
    <input type="reset" name="Reset" value="Reset">
    you can change:
    Code:
    action="confirm.php"
    to whatever you want to call your confirm page but it must be saved as .php
    now the code for confirm.php
    Code:
    <?php
    $receiver = "[email protected]";
    if(isset($_POST["send"])){
    $name = $_POST['name'];
    $website = $_POST['website'];
    $email = $_POST['email'];
    $msg = $_POST['msg'];
    $ip = $REMOTE_ADDR;
    $browser = $_SERVER['HTTP_USER_AGENT'];
    if(empty($name)){echo("No Name Entered<br />");}
    if(empty($email)){echo("No E-Mail Entered<br />");}
    if(empty($msg)){echo("No Message Entered<br />");}
    if(!empty($name) && !empty($email) && !empty($msg)){
    $headers = "MIME-Version: 1.0";
    $headers .= "Content-type: text/html; charset=iso-8859-1";
    $headers .= "From: ".$email."";
    $message =
    "Name: \n" .
    "Email: $E-Mail\n" .
    "Subject: $Reason\n" .
    "Message: $message\n" .
    "File URL: $url\n" .
    "IP: $ip\n" .
    "Browser: $browser";
    mail($receiver, "emailsubject", $message);
    echo( " Thank you <i>$Name</i> for your E-mail " )
    }
    }
    ?>
    You will need to change this code to correspond with you/your form, you need to change
    Code:
    $receiver = "[email protected]";
    to your email address and you can change
    Code:
    echo( " Thank you <i>$Name</i> for your E-mail " )
    to your personalised message !This will only work if you convert some HTML to PHP Click Here to use an online converter!
    If you have basic PHP coding knowledge you will know how to change the form and change the confirm page so everything will be submitted but if not just use that form

    ( 2nd Tutorial, hope it helps )
    *Image Removed


    Ahemm.. How exactly was my sig innapropriate?
    Goddamit i hate this forum :@
    I RESIGN FROM GRAPHICS DESIGNER :@ :@ :@

  2. #2
    Join Date
    Apr 2005
    Posts
    14,150
    Tokens
    773

    Latest Awards:

    Default

    its too confusing for me lmao.

  3. #3
    Join Date
    Jun 2004
    Posts
    753
    Tokens
    0

    Default

    a form was already created by mentor,
    http://www.habboxforum.com/showthrea...=form+tutorial
    My sites

    Mangacars.co.uk

    Ppxgames.com

    Uploadforfree.NET (EXPIRED)

    PixelLoft.NET

    Css-Gyro.com

    Neonfusion.NET

    [Zainx / Lofty]

  4. #4
    Join Date
    Jan 2005
    Location
    Churchdown
    Posts
    1,520
    Tokens
    0

    Latest Awards:

    Default

    My brain hurts

    Quote Originally Posted by Homer J Simpson
    I'm in shape... Round is a shape

    [glow]Cheeseboy76 (Forum Idiot) West Ham Own You All[/glow]
    ____
    ( . Y . )
    I see 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
  •