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
Share on other sites

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.
Link to comment
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 = 'cameron@caminator.com, blueair23@caminator.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.