PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hello Girls + Boys , I Need help On Form To Mail , The Problem Is I Have No Brains About It ... I Would Like Some Sort Of Script That Will Allow Me To Use SMTP Servers ... Would Be GREAT , Any Ideas Http://www.doomtfc.2y.net/new/poll/ <----- where it says contact us i would like a script on there
PLEASE HELP ME!
<?
if($name == "" || $comment == "") {
print('<html><head><title>error</title></head>');
print('<body>Please make sure to fill in all fields...go back and try again.');
print('</body></html>');
}
else
{
$main_message = "";
$name = '';
$comment = '';
$REMOTE_ADDR = ";
$email_2 = "YOUR_EMAIL_ADRESS_GOES_HERE";
mail($email_2, $subject,$main_message,"From:$name");
echo "<html><body>Sent</body></html>";
}
?>
then just make sure your fields are titled "name" and "comment", and also make sure the action of the form points to the file containing that code, also make sure to edit where it says your email adress goes here
Where $to_addy, Is the form or variable that contains the string that is to be the email address to send to,
$subject is the subject....
and $body is the main message.