Hello:
Two questions:
Is it possible to have a mail function inside a die sentence?
If yes, is it the syntax of the following sentence right?
thanks!
Example:
tep_db_connect() or die("<HTML><blabla></HTML> mail('e-mail@yahoo.com','subject','message','From: admin<admin@domain.com>\r\n'.'Reply-To:$e_mail\r\n'.'X-Mailer: PHP/'. phpversion());" );
Try: connect() or (mail() and die());
You could do something different
$con=tep_db_connect() if(!$con) { //have you mail and error message }
planetsim's is nicer; mine won't die() if mail() returns false.
Thanks both of you!
planetsim“s method works fine!
No problems.