Help w/ PHP and Forms

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!

Moderator: General Moderators

Post Reply
th3gh05t
Forum Newbie
Posts: 22
Joined: Tue Apr 20, 2004 11:52 pm

Help w/ PHP and Forms

Post 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>
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post 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.
Post Reply