I made a HTML form and I want to send it to my mail without using the "mailto:" stuff. But I can only find a way to send a PHP Form to my e-mail.
I'm trying to send it to another page, that will send it to my e-mail. But not sure how to do that with a HTML form.
Any help is appreciated. 🙂
www.php.net mail(); function
also note the headers. In order to send an HTML page you have to have the correct content-type.
--FrosT
But won't I need to have PHP in my form? I'm trying to keep my page where the contact form is ".html".
Thanks 🙂
use mail() to send the form contents:
mail("me@hereiam.com",$_POST['subject'],$_POST['message']);
you can also trigger and send a message at any time:
if ($blah==true) { mail("me@hereiam.com","blah!","It's true!"); }
You can keep the contact from .html.
For Example:
<form action="process.php" method="POST"> </form>
That is perfect html and is acceptable. Now the prcoess.php does your mailing part.
If you do not want to use php at all...well then look at JScript. I do not think it is possible to send mail without something more powerful than htm and jscript.
Thanks for the replys!
I did that, but I get this error:
Parse error: parse error, unexpected T_VARIABLE in /home/mernexc/public_html/send.php on line 3
Heres the form:
<form name="contactForm" method="post" action="http://mernex.com/send.php"> <input name="user" type="hidden" id="user" value="Fewski"><input name="formid" type="hidden" id="formid" value="38088"> <table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td> <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td colspan="2"><a1><b>Name:</a></a1></td> </tr><tr><td colspan="2"><p><font color="#000000" size="2" face="Tahoma"> <input name="1" type="text" id="q[1]" value="" size="50" maxlength="" class="fieldstyle"> </font></p> </td></tr><tr> <td colspan="2"><a1><b><b>Email:</a></b></a1></td> </tr><tr><td colspan="2"><p><font color="#000000" size="2" face="Tahoma"> <input name="2" type="text" id="q[2]" value="" size="50" maxlength="" class="fieldstyle"> </font></p> </td></tr><tr> <td colspan="2"><a1><b>Attention:</b></a1></td> </tr><tr><td colspan="2"><p><font color="#000000" size="2" face="Tahoma"> <select name="select"> <option>General Support</option> <option>Technical Support</option> <option>Billing & Support</option> </select> </font></p> </td> </tr><tr></tr><tr> <td colspan="2"><a1><b>Body:</b></a1></td> </tr><tr><td colspan="2"><font color="#000000" size="2" face="Arial"><textarea name="4" cols="50" rows="5" class="fieldstyle"></textarea></font></td></tr><tr><td colspan="2"><hr size="1"></td></tr> <tr><td colspan="2"><input name="submit" type="submit" value="Submit"> </td> </tr> </table></td></tr></table></form>
Heres the send.php:
<?php mail("matt@teamjdc.com",$_POST['1'],$_POST['2']$_POST['select']$_POST['4']); ?>
Not sure why I get that?
Builder83 wrote:Not sure why I get that?
Because you're jamming variables together without anything to say why.
$_POST['1'].$_POST['select'].$_POST['4']
But you'd probably want to format it a bit more prettily than that.