Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

script redirect and send

  • 27-08-2002 03: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, Registered Users 2 Posts: 7,742 ✭✭✭mneylon


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


  • Registered Users, Registered Users 2 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