Results 1 to 2 of 2

Thread: Problem with form

  1. #1
    Join Date
    May 2007

    Smile Problem with form

    Hellow, Im novice.
    I did a web presentacion in frontpage but the server where is it is on Linux so my form doesnt work good because of missing ef extensions of frontpage.
    Now I did a form with

    <FORM METHOD="POST" ACTION="mailto:mymail">
    &nbsp;<INPUT TYPE="text" NAME="nombre" SIZE="30">
    <INPUT TYPE="text" NAME="telefono" SIZE="30">
    &nbsp;<INPUT TYPE="text" NAME="correoelectronico" SIZE="30">

    Where is mymail I put my email!

    But when I want to send a form first I have a mesage in spanish but like the web page shows email and dont punt a code for a informations of the form.

    Second I would like to send automaticly informations of a form to my mail.

    I supose that I need some cgi or a code, so if somebody doesnt care for my Inglish and want to help, I wait.
    Please gvi me detalled information what and where to do a things.
    Thank you very much.

  2. #2
    Join Date
    Nov 2006
    Springfield, MO
    Yes, you need a PHP script to collect, format and then the information to your email. In your action, specify a script such as formprocessor.php and add the following code:

    PHP Code:
    //declare msg variable to help concatenate our message fields
    $msg="Name: " $_POST['name'] . "\n";
    $msg.="Email Address: " .$_POST['email'] . "\n";
    $msg.="Comments/Suggestions: " .$_POST['comments']. "\n";
    //use an additional variable to allow recipient to reply directly from this email
    $additionalheaders="From: " .$_POST['email'];
    //use mail function to send the mail, using all of four parameters
    mail("webmaster@domain.com""Contact Us"$additionalheaders$msg);
    //re-direct visitors to a success page
    //kill the script from executing any more
    This is just a START. Make sure you add any additional validation that you may require.
    Ryan Butler

    Ryan Butler.org

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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