Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2006
    Location
    England
    Posts
    610
    Tokens
    0

    Default Whats wrong with this?

    OKay I was making a DJ Application form but it says that I haven't filled in all fields

    THE FORM:
    HTML Code:
    <?php
    $ipi = getenv("REMOTE_ADDR");
    ?>
    
    <form method="post" action="sendmail.php">
    
    <p><font face="Verdana" size="1">Habbo Name<br>
        <input type="text" name="name" size="30"></font></p>
    
        <p><font face="Verdana" size="1">Email Address<br>
        <input type="text" name="email" size="30"></font></p>
    
        <p><font face="Verdana" size="1">Hotel Used<br>
        <select size="1" name="hotel">
        <option selected>Choose one...</option>
        <option>UK</option>
        <option>USA</option>
        <option>CA</option>
        <option>AU</option>
        <option>Other</option>
        </select></font></p>
    
        <p><font face="Verdana" size="1">Time Zone<br>
        <input type="text" name="timezone" size="10"></font></p>
    
        <p><font face="Verdana"></font><font face="Verdana" size="1">DJ'ing Equipment<br>
        <select size="1" name="equipment">
        <option selected>Choose one...</option>
        <option>Winamp/Shoutcast</option>
        <option>Sam Broadcaster</option>
        </select></font></p>
    
        <p><font face="Verdana" size="1">Do you have a working microphone<br>
        <select size="1" name="microphone">
        <option selected>Choose one...</option>
        <option>Yes</option>
        <option>No</option>
        </select></font></p>
    
        <p><font face="Verdana" size="1">Do you have a working microphone<br>
        <select size="1" name="songs">
        <option selected>Choose one...</option>
        <option>Yes</option>
        <option>No</option>
        </select></font></p>
    
        <p><font face="Verdana" size="1">Past Experience (put NONE if you have had 
        no experience)<br>
        <textarea rows="5" name="experience" cols="29"></textarea></font></p>
    
    <input type="submit" value="Send" />
    </form>
    SEND:
    PHP Code:
    <?php
    if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) 
    {
    die (
    "Invalid Email Address"); 
    $badinput "<h2>Feedback was NOT submitted</h2>\n";
    echo 
    $badinput;
    }
    if(empty(
    $visitor) || empty($visitormail) || empty($notes )) {
    die (
    "You didn't fill in all the fields");
    }

    $subject $hotel

    $message "Name: $name \n
    Email: 
    $email \n
    Hotel: 
    $hotel \n
    Time Zone: 
    $timezone \n
    Equipment: 
    $equipment \n
    Microphone: 
    $microphone \n
    Songs: 
    $song \n
    Experience: 
    $experience \n
    Additional Info : IP = 
    $ip \n
    "
    ;

    $from "From: $email\r\n";


    mail("[email protected]"$name$email$hotel$timezone$equipment$microphone$experience);

    ?>
    Edited by L&#181;ke (Forum Moderator): Thread Moved From Website Designing. Please post in the correct section next time, Thanks .
    Last edited by Lµke; 02-04-2007 at 09:55 PM.


  2. #2
    Join Date
    Feb 2007
    Location
    Manchester
    Posts
    7,556
    Tokens
    58

    Latest Awards:

    Default

    The problem is it's ******

  3. #3
    Join Date
    Feb 2007
    Location
    Manchester
    Posts
    7,556
    Tokens
    58

    Latest Awards:

    Default

    Matt I beleive you fixed it. Why dont you lock the thread? :rolleyes:

  4. #4
    Join Date
    Jul 2006
    Location
    England
    Posts
    610
    Tokens
    0

    Default

    It didn't work ;[


  5. #5
    Join Date
    Dec 2006
    Posts
    521
    Tokens
    0

    Default

    your not defining the forms.

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

    Default

    PHP Code:
    <?php
    if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) 
    {
    die (
    "Invalid Email Address"); 
    $badinput "<h2>Feedback was NOT submitted</h2>\n";
    echo 
    $badinput;
    }
    if(empty(
    $visitor) || empty($visitormail) || empty($notes )) {
    die (
    "You didn't fill in all the fields");
    }
    Is incorrect
    Change to
    PHP Code:
    <?php
    if(!$email == "" && (!strstr($email,"@") || !strstr($email,"."))) 
    {
    die (
    "Invalid Email Address"); 
    }
    if(empty(
    $name) || empty($email) || empty($hotel) || empty(timezone) || empty($equipment) || empty($microphone) || empty($songs) || empty($experience)) {
    die (
    "You didn't fill in all the fields");
    }


  7. #7
    Join Date
    Jul 2006
    Location
    England
    Posts
    610
    Tokens
    0

    Default

    Thanks for help
    Thread closed


Posting Permissions

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