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 7 of 7
  1. #1
    Join Date
    Jun 2006
    Location
    Northern Ireland
    Posts
    307
    Tokens
    0

    Default Help with contact form

    Hello, I am creating a contact form for my site but I tried to test it and it would not work. I was wondering if anyone could help me? I here's the codes:

    PHP Code:
    <?php
    $Habbo Name 
    = ($_POST["Habbo Name"]);
    $Email = ($_POST["E-mail"]);
    $Reason for contacting us = ($_POST["Reason"]);
    $Message = ($_POST["Message"]);
    $to "[email protected]";
    $message "Name: $name<br />
    Email: 
    $email <br />
    Reason: 
    $reason <br />
    Question: 
    $question";
    $headers "MIME-Version: 1.0" "rn";
    $headers .= "Content-type:text/html;charset=iso-8859-1" "rn";
            if (
    $_GET["action"] == "submit")
    {
            if (
    $Habbo Name== "")
        {
            echo 
    "Whoops! You didn't enter your Habbo Name.";
            exit;
        }
     
                if (
    $Email == "")
        {
            echo 
    "Whoops! You didn't provide us with an e-mail";
            exit;
        }
                    if (
    $Reason for contacting us == "")
        {
            echo 
    "Whoops! You didn't say why you're contacting us!";
            exit;
        }
                    if (
    $Message == "")
        {
            echo 
    "Whoops! You didn't write anything!";
            exit;
        }
     
        echo 
    "MK. If the user inputs the data properly, this'll show.";
        
    mail($to,$subject,$message,$headers);
        exit;
        }
    PHP Code:
    <form action="form.php" method="post">
                <
    p>Habbo Name
                    <
    input name="Habbo Name" type="text" maxlength="15"
                </
    p>
                <
    p>E-mail: <input type="text" name="E-mail">
                </
    p>
                <
    p>Reason for contacting us
                  <
    select name="Reason" id="Reason">
                    <
    option selected>Please select an option</option>
                    <
    option>I have a question about Habblog</option>
                    <
    option>I have detected an error on the site</option>
                    <
    option>Complaint</option>
                    <
    option>Compliment</option>
                    <
    option>Link my fansite please</option>
                    <
    option>I am submitting an idea</option>
                    <
    option>Other </option>
                  </
    select>
                </
    p>
                <
    p>Message: <textarea name="Message" cols="30" id="Message">Type your message here</textarea
                </
    p>
                <
    p><input type="submit" name="SubmitForm" value="Submit Form">
                &
    nbsp;            </p>
              </
    form
    Post Count:

    50 100 200 500 1000

  2. #2
    Join Date
    Apr 2007
    Posts
    2,431
    Tokens
    0

    Latest Awards:

    Default

    I'm not a wizz but I don't think 'post' works in IE6 or above ....

    Im not sure if thats just HTML form though

    [X] [X] [X]

  3. #3
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    change $reason for contacting us to $reason
    Coming and going...
    Highers are getting the better of me

  4. #4
    Join Date
    Jun 2006
    Location
    Northern Ireland
    Posts
    307
    Tokens
    0

    Default

    Quote Originally Posted by MrCraig View Post
    change $reason for contacting us to $reason
    Would that matter ?
    Post Count:

    50 100 200 500 1000

  5. #5
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    yes..

    $reason for contacting

    means jibberish.

    'for' is a loop and contacting is just some random word.
    Coming and going...
    Highers are getting the better of me

  6. #6
    Join Date
    Jun 2006
    Location
    Northern Ireland
    Posts
    307
    Tokens
    0

    Default

    There's a PHP form maker script on cPanel so I may just use that and see...
    Post Count:

    50 100 200 500 1000

  7. #7
    Join Date
    May 2006
    Posts
    1,797
    Tokens
    0

    Latest Awards:

    Default

    Coming and going...
    Highers are getting the better of me

Posting Permissions

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