Beginning PHP
Posted: Thu Aug 13, 2009 5:19 am
Hi all,
Could someone please help me out? I have quite a bit of programming experience in a number of languages, but am new to PHP, and can't figure out why this VERY SIMPLE php email script won't work!!! So frustrating, it just returns a blank screen, which I assume means a syntax error?
Code:
<?php
$to = "me@me.com";
$subject = "dummy subject";
$body = "dummy body";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>
Thanks to anyone who can help me out!!
t
Could someone please help me out? I have quite a bit of programming experience in a number of languages, but am new to PHP, and can't figure out why this VERY SIMPLE php email script won't work!!! So frustrating, it just returns a blank screen, which I assume means a syntax error?
Code:
<?php
$to = "me@me.com";
$subject = "dummy subject";
$body = "dummy body";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
?>
Thanks to anyone who can help me out!!
t