Whats the difference

Discussion in 'PHP' started by oo7ml, Oct 1, 2007.

  1. #1
    whats the difference in the bold part, and which one is correct

    send_email('info@domainname.com', $email, $topic, $body );

    AND

    @ mail($email, $topic, $body, $headers);

    AND

    mail("info@domainname.com", $topic, $body, $from);
     
    oo7ml, Oct 1, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    send_mail() is not a standard function, and it doesn't exist unless you define it.

    The @ operator silences possible error output. (Error messages)

    So all of them can be correct, if you define the first function yourself.
     
    nico_swd, Oct 1, 2007 IP