Tweet
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Aug 2009
    Posts
    2
    Rep Power
    0

    Default php mail() validation

    Hello friends please can any one help me how where mail() validation put in this code for short form.

    Code here:-

    PHP Code:
    <?php
    if (isset($_REQUEST['email']))
    //if "email" is filled out, send email
    {
    //send email
    $email $_REQUEST['email'] ;
    $subject $_REQUEST['subject'] ;
    $message $_REQUEST['message'] ;
    mail("[email protected]""$subject",
    $message"From: $email);
    echo 
    "Thank you for using our mail form";
    }
    else
    //if "email" is not filled out, display the form
    {
    echo 
    "<form method='post' action='inquiry.php'>
    Email: <input name='email' type='text' /><br />
    Subject: <input name='subject' type='text' /><br />
    Message:<br />
    <textarea name='message' rows='15' cols='40'>
    </textarea><br />
    <input type='submit' />
    </form>"
    ;
    }
    ?>
    [URL=http://www.iaqsource.com/aprilaire.php]Aprilaire[/URL] [URL=http://www.filter-outlet.com/]Refrigerator water filter[/URL]

  2. #2
    MFC Member immediate's Avatar
    Join Date
    Nov 2009
    Location
    kavoir.com
    Posts
    40
    Rep Power
    0

    Default

    For a starter, don't rely on $_REQUEST for catching the sent values, use either $_GET or $_POST.

    What's the error message you got?
    UsableDatabases.com

Posting Permissions

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

Advertisement

Sponsors




Increase your deposit by 30%. Expand your trading opportunities. Earn more profit!