Page 1 of 1

Help w/ PHP and Forms

Posted: Fri Jun 04, 2004 2:06 pm
by th3gh05t
Hi,

I have made an HTML form file here.

I would like to have it send an e-mail when the form is completed, and also print out in the next page, who, what, and when.

Thanks for your help!

Here is some PHP code that I tried:

Code: Select all

<html>
<body>

Thanks for maintaining the servers!<br>
<br>

<? echo $_POST["select"]; ?> was maintained by <? echo $_POST["initial1"]; ?> on <? echo (Date("l F d, Y")); ?> at <? echo (date("h:i A")); ?>
<br><br>
<? 

$result [] = $_POST["select"];
$result [] = $_POST["initial1"];

$result2 = "<b>Server:</b>";
$result3 = "<b>Checked by:</b>;
$result4 = "<b>Date:</b>;


//print



?>

</body>
</html>

Posted: Fri Jun 04, 2004 6:59 pm
by kettle_drum
Check out the mail() function in the php manual.

You can add this to the script you already have and it will email whoever you want and print the thank you message.