Submit

liunx

Guest
I dunno whether this is HTML or not, but anyway, what i wanna do is make the submit button email me, but...i dont want the user to have to use outlook to send me the form they've filled in.....get wat i mean?<!--content-->ahh Bugga!<!--content-->If you have PHP installed, I can write a script for you. It would only be a couple lines max. Let me know.<br />
<br />
Cgraz<!--content-->ohhh....yes please that would be great<!--content-->make your form tag look like this:<br />
<br />
<form method="post" action="process.php"><br />
<br />
Then create a file process.php and put it in the same directory as your form page. Copy and paste the following ocde into process.php and modify the things I mention below.<?<br />
<br />
// address the email will be sent to (change the address between quotes)<br />
$to = "[email protected]";<br />
<br />
// message subject (change only what is between quotes)<br />
$subject = "Subject Here";<br />
<br />
// replace <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --> with the email you want to be<br />
// shown as the sender<br />
$headers = "From: <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e -->";<br />
<br />
// don't modify anything below this line<br />
<br />
$msg = "";<br />
<br />
foreach($_POST as $key => $value) {<br />
$msg .= ucfirst(str_replace("_", " ", $key)) . ": " . $value . "\n";<br />
}<br />
<br />
mail($to, $subject, $msg, $headers);<br />
<br />
?><br />
<br />
Your submission was sent successfully!<br />
Cgraz<!--content-->that's great thanx 4 that m8<!--content-->
 
Back
Top