Jump to content

Email form


caminator

Recommended Posts

I have an HTML form that is being used as a Contat Us form. I want it to email me the data. Can someone help with how to do that with PHP?? I have it redirecting to a site that says "thanks for contacting us"....and shows the data they entered. Can I set it up so it will email the contents AND still go to this other page? Here is my form code. Thanks!

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<form action="http://www.caminator.com/contact/sendfeedback.php" name="Contact" method="POST">
<div align="center" style="font:Arial; font-size:16px;">
<input type="radio" name="type" id="Praise" value="Praise" checked="checked">Praise
<input type="radio" name="type" id="Complaint" value="Complaint">Complaint
<input type="radio" name="type" id="Problem" value="Problem">Problem
<input type="radio" name="type" id="Suggestion" value="Suggestion">Suggestion
</div>

<div class="contact_form">
<table border="0" cellpadding="0" cellspacing="0" width="80%" id="AutoNumber5">
<tr>
<td width="10%" align="right" valign="top"><font size="2">Name :</font></td>
<td width="90%" valign="top">&nbsp;<input type="text" name="name" MAXLENGTH="25" size="40"></td>
</tr>
<tr>
<td width="10%" align="right" valign="top"><font size="2">E-mail :</font></td>
<td width="90%" valign="top">&nbsp;<input type="text" name="email" MAXLENGTH="40" size="40"></td>
</tr>
<tr>
<td width="10%" align="right" valign="top"><font size="2">Subject :</font></td>
<td width="90%" valign="top">&nbsp;<input type="text" name="subject" MAXLENGTH="50" size="40"></td>
</tr>
<tr>
<td width="10%" align="right" valign="top" colspan="2">&nbsp;</td>
</tr>
<tr>
<td width="10%" align="right" valign="top"><font size="2">Message :</font></td>
<td width="90%" valign="top">&nbsp;<textarea cols="40" rows="6" name="message"></textarea></td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td width="20%" align="right" valign="top"></td>
<td valign="top" width="30%">&nbsp;<input type="submit" value="Send Feedback">&nbsp;<input type="reset" value="Clear"></td>
</tr>
</table>
</div>
</form>[/quote]
Link to comment
https://forums.phpfreaks.com/topic/4553-email-form/
Share on other sites

[!--quoteo(post=353431:date=Mar 9 2006, 04:35 PM:name=Gaia)--][div class=\'quotetop\']QUOTE(Gaia @ Mar 9 2006, 04:35 PM) [snapback]353431[/snapback][/div][div class=\'quotemain\'][!--quotec--]
The PHP mail() function is what you are looking for [a href=\"http://ca3.php.net/manual/en/ref.mail.php\" target=\"_blank\"]http://ca3.php.net/manual/en/ref.mail.php[/a]

Just integrate the mail() function in your sendfeedback.php file and it will still display the message.
[/quote]

I appreciate the reply, but I'm way to much of a beginner to be able to follow it. I did get this much out of the link you sent me. Am I anywhere close to where I need to be?


[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]<?php
$to = '[email protected], [email protected]';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: [email protected]' . "\r\n" .
'Reply-To: [email protected]' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>
[/quote]

Link to comment
https://forums.phpfreaks.com/topic/4553-email-form/#findComment-15960
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.