HOW TO DECLARE ACTION IN THE FOLLOWINg

Discussion in 'Programming' started by uma mahesh, Jan 20, 2010.

  1. #1
    HOW TO DECLARE ACTION IN THE FOLLOWING PLZ HELP ME.... OR GIVE ANOTHER METHOD IN BREIF TUTORIAL.


    Step 1: Create contact.html page and design form and name all the form elements.

    Step 2: Declare action = thanks.php in the form

    Step 3: Create new php page and name it as thanks.php

    Step 4: Paste the following code in thanks.php and update the target email id from the php code.


    <?PHP
    $mailto = "hyderabaddesigns@yahoo.com";
    $email = $HTTP_POST_VARS['email'];
    if ($email == "") {
    $email = $mailto;
    }
    $mailsubj = "From Site";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "Values submitted from web site form :\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    if ($key!="submit")
    {
    $mailbody .= "$key : $val\n";
    }
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    ?>
     
    uma mahesh, Jan 20, 2010 IP
  2. NeoCambell

    NeoCambell Peon

    Messages:
    456
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    NeoCambell, Jan 20, 2010 IP