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 8 of 8
  1. #1
    Join Date
    Jul 2005
    Location
    Bristol
    Posts
    2,054
    Tokens
    -10

    Latest Awards:

    Default Contact Form Code

    Simple Code For A Contact Form I Can Make 100's Of other things too lmao

    Simple copy n Paste this code into the content box on your site, Replacing the [email protected] with the email you want the form to be sent to

    <?php
    //Support for this script found at http://www.habbo-twice.co.uk/ at the forums area.
    //Variables - Your e-mail address (keep this file name : contact.php)
    $your_email = "[email protected]";

    //Show Mail Form
    function showForm() {
    echo "<html><head>\n"
    ."<title>Contact Us</title>\n"
    ."</head><body>\n"
    ."<font face='arial' size='2'>\n"
    ."<h1>Contact Us</h1>\n"
    ."<form method='post' action='contact.php?action=sendEmail'>\n"
    ."<table width='100%' border='0' cellspacing='0' cellpadding='4'>\n"
    ."<tr>\n"
    ."<td width='25%'><font face='arial' size='2'>Your Name:</font></td>\n"
    ."<td width='75%'><input type='text' name='name' size='40'></td>\n"
    ."</tr><tr>\n"
    ."<td width='25%'><font face='arial' size='2'>Your Email:</font></td>\n"
    ."<td width='75%'><input type='text' name='email' size='40'></td>\n"
    ."</tr><tr>\n"
    ."<td width='25%'><font face='arial' size='2'>Subject:</font></td>\n"
    ."<td width='75%'><input type='text' name='subject' size='40'></td>\n"
    ."</tr><tr>\n"
    ."<td width='25%'><font face='arial' size='2'>Message:</font></td>\n"
    ."<td width='75%'><textarea name='message' rows='10' cols='35'></textarea></td>\n"
    ."</tr></table>\n"
    ."<input type='submit' value='Send'>\n"
    ."</form></body></html>\n";
    }

    //Send Email
    function sendEmail() {
    global $your_email,$name,$email,$subject,$message;
    if ( !$name | !$email | !$subject | !$message ) {
    header ("Location: contact.php");
    }
    else {
    $email2 = "$email ($name)";
    mail( $your_email, $subject, $message, "From: $email2");
    echo "<html><head>\n"
    ."<title>Email Sent!</title>\n"
    ."</head><body>\n"
    ."<font face='arial' size='2'>\n"
    ."<h1>Email Sent!</h1>\n"
    ."Your Email has been sent with success!\n"
    ."</font></body></html>\n";
    }
    }

    //Switch Statement
    Switch ( $action ) {

    Case 'sendEmail':
    sendEmail();
    Break;

    Default:
    showForm();

    }

    ?>

  2. #2
    Join Date
    Oct 2004
    Location
    Wales, UK
    Posts
    974
    Tokens
    1,450
    Habbo
    icebox12

    Latest Awards:

    Default

    Havn't tried yet so I cannot give a rating good work though I'll test it in a moment
    The one and only

    Instagram (/needsy)
    Twitter

  3. #3
    Join Date
    Jul 2005
    Location
    Bristol
    Posts
    2,054
    Tokens
    -10

    Latest Awards:

    Default

    Ty Its the one i used on my site, But its Closed Now

  4. #4
    Join Date
    Oct 2004
    Location
    Wales, UK
    Posts
    974
    Tokens
    1,450
    Habbo
    icebox12

    Latest Awards:

    Default

    Ok the script here has worked perfectly...

    Well done, great work +rep

    Keep up the good work

    --
    Regards
    The one and only

    Instagram (/needsy)
    Twitter

  5. #5
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    pretty basic "/ plus not realy helpful if people want to be able to customize there form, athogh then again, they could use my tutoral for that along with a little more work "/

  6. #6
    Join Date
    Jul 2005
    Location
    Bristol
    Posts
    2,054
    Tokens
    -10

    Latest Awards:

    Default

    <?php
    //Support for this script found at http://www.habbotwice.co.uk/ at the forums area.
    //Variables - Your e-mail address (keep this file name : contact.php)
    $your_email = "eggsnbacon_01********.co.uk";

    //Show Mail Form
    function showForm() {
    echo "<html><head>\n"
    ."<title>Contact Us</title>\n"
    ."</head><body>\n"
    ."<font face='arial' size='2'>\n"
    ."<h1>Contact Us</h1>\n"
    ."<form method='post' action='contact.php?action=sendEmail'>\n"
    ."<table width='100%' border='0' cellspacing='0' cellpadding='4'>\n"
    ."<tr>\n"
    ."<td width='25%'><font face='arial' size='2'>Your Name:</font></td>\n"
    ."<td width='75%'><input type='text' name='name' size='40'></td>\n"
    ."</tr><tr>\n"
    ."<td width='25%'><font face='arial' size='2'>Your Email:</font></td>\n"
    ."<td width='75%'><input type='text' name='email' size='40'></td>\n"
    ."</tr><tr>\n"
    ."<td width='25%'><font face='arial' size='2'>Subject:</font></td>\n"
    ."<td width='75%'><input type='text' name='subject' size='40'></td>\n"
    ."</tr><tr>\n"
    ."<select name="rate">
    <option>5</option>
    <option>4</option>
    <option>3</option>
    <option>2</option>
    <option>1</option>
    </select>

    ."<td width='25%'><font face='arial' size='2'>Message:</font></td>\n"
    ."<td width='75%'><textarea name='message' rows='10' cols='35'></textarea></td>\n"
    ."</tr></table>\n"
    ."<input type='submit' value='Send'>\n"
    ."</form></body></html>\n";
    }

    //Send Email
    function sendEmail() {
    global $your_email,$name,$email,$subject,$message,$rate;
    if ( !$name | !$email | !$subject | !$message | !$rate ) {
    header ("Location: contact.php");
    }
    else {
    $email2 = "$email ($name)";
    mail( $your_email, $subject, $message, "From: $email2");
    echo "<html><head>\n"
    ."<title>Email Sent!</title>\n"
    ."</head><body>\n"
    ."<font face='arial' size='2'>\n"
    ."<h1>Email Sent!</h1>\n"
    ."Your Email has been sent with success!\n"
    ."</font></body></html>\n";
    }
    }

    //Switch Statement
    Switch ( $action ) {

    Case 'sendEmail':
    sendEmail();
    Break;

    Default:
    showForm();

    }

    ?>


    </body>
    </html>
    Tell Me if The Site Rating Bit Works On That ''/ I'll Mod It innamin Its Just I My sites cPanel Is dwn so i cnt test it

  7. #7
    Join Date
    Oct 2004
    Location
    Wales, UK
    Posts
    974
    Tokens
    1,450
    Habbo
    icebox12

    Latest Awards:

    Default

    Error occured:-

    Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home2/habbling/public_html/contact.php on line 43
    The one and only

    Instagram (/needsy)
    Twitter

  8. #8
    Join Date
    Jul 2005
    Location
    Bristol
    Posts
    2,054
    Tokens
    -10

    Latest Awards:

    Default

    Hmm, I'LL Mod it Innamin

Posting Permissions

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