Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

script redirect and send

Options
  • 27-08-2002 3:33pm
    #1
    Closed Accounts Posts: 11


    I want to set up a form that collects name (first and last), email and telephone, this is going to passed onto a script page (php) which will thank them for their details and dsiplay them on the page...

    no immediate problems so far

    what I then wanted to try and do was to send the data passed on from the form by email to a recipient.

    Is there a bit of script that will send on the form data to me by email

    or am I being overly complicated

    All suggestions are warmly received


Comments

  • Registered Users Posts: 7,739 ✭✭✭mneylon


    There are a lot of these scripts around, so I'd suggest having a look at Hotscripts


  • Registered Users Posts: 258 ✭✭peterd


    Plug this into the php page and see what happens...
    The form fields should be named "firstname", "lastname", "ph" and "email".[PHP]<?php
    if($firstname && $lastname && $ph && $email) {

    // settings
    $sendemailto = "killian@domain.com"; // who the email goes to

    // send email
    $from = "\"$firstname $lastname\" <$email>";
    $message = "
    From.... $firstname $lastname
    Ph...... $ph
    E-mail.. $email
    ";

    mail($sendemailto, $subject, $message, "From: $email");
    echo "Email sent!";

    } else {
    echo "You must enter your Name, E-mail and Contact Phone Number first.";
    }
    ?>[/PHP]


  • Closed Accounts Posts: 11 killian


    thanks a million, I'll give that a shot and let you know what happens


Advertisement