View Full Version : PHP E-mail Form


Greeno
02-28-2006, 07:21 PM
I have a page named process.php where I have the information for the form, but the form didn't work. Is my code right? I wasn't sure if I had to, or know what I had to, put where it says wordwrap, so I left it blank.

<?php
// 01. - \n 02. - \n 03. -
$message = "Line 1\nLine 2\nLine 3";

// ()
$message = wordwrap($message, 70);

// Send
mail('bob.e.chaos@gmail.com', 'Test Form', $message);
?>

Douglas
03-01-2006, 12:06 AM
Your mail thing on your host may not work, try this, it should show if it doesn't work or not:


<?php
// 01. - \n 02. - \n 03. -
$message = "Line 1\nLine 2\nLine 3";

// ()
$message = wordwrap($message, 70);

// Send
if (mail('bob.e.chaos@gmail.com', 'Test Form', $message)) {
echo "sent";
}
else{
echo "error with mail";
}
?>


I don't see any errors :D