Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: mail php

  1. #1
    Regular Coder
    Join Date
    Aug 2005
    Posts
    279
    Thanks
    0
    Thanked 0 Times in 0 Posts

    mail php

    Hello I have this code, but it doesn't tell me any errors and echos any text, what's wrong with it?

    PHP Code:

    <?php
    function checkOK($field)
    {
    if (
    eregi("\r",$field) || eregi("\n",$field)){
    die(
    "Invalid Input!");
    }
    }

    $name $_POST['name'];
    checkOK($name);
    $email $_POST['email'];
    checkOK($email);
    $comments=$_POST['comments'];
    checkOK($comments);
    $to "dave555th@yahoo.com";
    $message "$name just contacted you. He said: \n $comments \n";
    if (
    $mail($to"Comments"$message"From: $email\n")) {
      echo 
    "Thanks for your comments.";
    }
    else {
      echo 
    "There was a problem sending the mail. Please check that you filled in the form correctly.";
    }
    ?>

  • #2
    Regular Coder
    Join Date
    Aug 2005
    Posts
    279
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I got it... sorry guys still, I don't understand the function, any references to help me understanding that function?

  • #3
    $object->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,100
    Thanks
    2
    Thanked 23 Times in 23 Posts
    The manual is your best friend.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!

  • #4
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts
    well... if you die() nothing else will be seen...
    Why not thank me?

    http://adamsworld.name


  •  

    Posting Permissions

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