Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jul 2006
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help With A 'Request A Quote' Form...

    Hi Guys,

    Just a simple question really...

    For a page where you need to send more than one 'option' in a form to an email address... how do you set it up?

    So far i've got...

    PHP Code:
    <?
    $email 
    $_POST['email'];
    $name $_POST['name'];
    $other $_POST['otherInformation'];
    $message $_POST['name'] ['companyName'] ['email'] ['telephone'] ['interestedIn'] ['existingSite'] ['hostingAndDomain'] ['otherInformation'];

    if (empty(
    $name) || empty($email) || empty($other))
            {
            echo 
    '<div align="center" <span class="style2"><strong>ERROR:</strong> You left one or more fields empty, please complete all fields and try again.</span></div>';
            include 
    'quote.htm';
        exit();
            }
            else
            
    mail"craig.howarth@toon-army.co.uk""Quote",
      
    $message"From: $email" );
    header("Location: success.html");
    ?>
    I know the '$message' bit is wrong... how do you set that bit up? I want to add more than one bit of information into the form sent to the email address.

  • #2
    New Coder
    Join Date
    Dec 2006
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Not sure i understand 100% what you want to do, but i assume you want to join the data to one big string ($message) if so youd do this using the . operator

    PHP Code:
    message $_POST['name'] . "\n" .
                   
    $_POST['companyName'] . "\n" .
                   
    $_POST['email'
    for example
    http://demo.vegui.org - vegUI AJAX framework
    http://www.landsofkazram.com - browser based graphical MMORPG

  • #3
    New Coder
    Join Date
    Jul 2006
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That is exactly what I wanted Vegu - it's working too... thanks a lot for your help


  •  

    Posting Permissions

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