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

Thread: Form Help

  1. #1
    Join Date
    Mar 2007
    Location
    Earth, sometimes...
    Posts
    136
    Tokens
    0

    Default Form Help

    The form I made is working, but the email it sends me is blank. The actual form is working, but the mailconfig.php must have something wrong with it. I get an email with the correct subject and 'from email' but the actual email is blank.

    Heres the code for mailconfig.php:

    <?
    $name = $_REQUEST['realname'] ;
    $habboname = $_REQUEST['habboname'] ;
    $email = $_REQUEST['email'] ;
    $hotel = $_REQUEST['hotel'] ;
    $job = $_REQUEST['job'] ;
    $experience = $_REQUEST['experience'] ;

    mail( "MY EMAIL", "Job Application",
    $message, "From: $email" );
    header( "Location: confirmation.htm" );
    ?>

    This is my first time making a form, so I have NO idea what is wrong. Please help by posting the problem and/or posting the working mailconfig.php code.

    Thanks,

    sBosma
    I like a good nap. Sometimes its the only thing getting me up in the morning.


    Selling (un)coded templates, PM me for info


  2. #2
    Join Date
    Jul 2006
    Location
    Athens
    Posts
    842
    Tokens
    0

    Default

    PHP Code:
    <?php
    if(!$email == "" && (!strstr($email,"@") || !strstr($email,"."))) 
    {
    die (
    "Invalid Email Address"); 
    }
    if(empty(
    $name) || empty($habboname) || empty($email) || empty($hotel) || empty($job) || empty($experience) ) {
    die (
    "You didn't fill in all the fields");
    }

    $subject Job Application

    $message "Name: $name \n
    Habbo Name: 
    $habboname \n
    Email: 
    $email \n
    Hotel: 
    $hotel \n
    Job: 
    $job \n
    Experience: 
    $experience";

    $from "From: [email protected]\r\n";


    mail("YOUR EMAIL"$subject$message$from);
    echo 
    "Thank you for your application"

    ?>
    Edit YOUR EMAIL to your email address and edit
    PHP Code:
    $from "From: [email protected]\r\n"
    to which email address you want it to come from.


  3. #3
    Join Date
    May 2005
    Location
    San Francisco, CA
    Posts
    7,160
    Tokens
    2,331

    Latest Awards:

    Default

    PHP Code:
    <?php
    if(!$email == "" && (!strstr($email,"@") || !strstr($email,"."))) 
    {
    die (
    "Invalid Email Address"); 
    }
    if(empty(
    $name) || empty($habboname) || empty($email) || empty($hotel) || empty($job) || empty($experience) ) {
    die (
    "You didn't fill in all the fields");
    }

    $subject Job Application

    $message "Name: $name \n
    Habbo Name: 
    $habboname \n
    Email: 
    $email \n
    Hotel: 
    $hotel \n
    Job: 
    $job \n
    Experience: 
    $experience";

    $from "From: [email protected]\r\n";


    mail("YOUR EMAIL"$subject$message$from);
    echo 
    "Thank you for your application"

    ?>
    Wth?
    $message = "Name: $name \n
    Habbo Name: $habboname \n
    Email: $email \n
    Hotel: $hotel \n
    Job: $job \n
    Experience: $experience";
    You havn't defined ANY of those variables?

  4. #4
    Join Date
    Mar 2007
    Location
    Earth, sometimes...
    Posts
    136
    Tokens
    0

    Default

    I got a form working. Thanks to any one who helped though.
    I like a good nap. Sometimes its the only thing getting me up in the morning.


    Selling (un)coded templates, PM me for info


  5. #5
    Join Date
    Nov 2006
    Location
    Cheshire.
    Posts
    730
    Tokens
    250

    Default

    Quote Originally Posted by Invent View Post
    Wth?

    You havn't defined ANY of those variables?
    I think he was going off the Variables that were in the 1st post.


    Give us an add like!

Posting Permissions

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