simple contact form question (code included)
Posted: Thu Jul 05, 2007 10:32 pm
feyd | Please use
The From html:
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Im a designer and no coder, especially PHP. Im trying to setup a simple contact form but keep getting a "no address in header" error.
The page in question is [url=http://www.outlawdesign.com/new-design]here.[/url]
The PHP:Code: Select all
<font face=verdana size=2>
<?php
$email_msg_to = "davedbrosche@gmail.com";
$email_msg_from = "davedbrosche@gmail.com";
/*
All these other feilds values $user_name, $email_message, $email_subject, $email_address
are retrived from email_form.htm that we have created earlier!
*/
$message = "Comments/Suggestions \n\nName: ". $user_name ."\nEmail: ". $email_address ."\n\nMessage: ". $email_message;
mail($email_address, "Msg From: " . $user_name ." Comments/Suggestions", $message, "From: ". $email_from);
echo "Thanks for your comments/suggestions <B>". $user_name . "</B> we have recieved your message and will contact you soon.";
?>Code: Select all
<form method=post action="/new-design/email_form.php">
<Table border=0 cellspacing=0 cellpadding=0 class=small_txt>
<TR><TD width=150><font class=small_txt><B>Your Name: </B></font></TD>
<TD><input type=text class=small_txt name=user_name size=50></TD></TR>
<TR><TD width=150><font class=small_txt><B>Your Email address: </B></font></TD>
<TD><input type=text class=small_txt name=email_address size=50></TD></TR>
<TR><TD width=150><font class=small_txt><B>Your Message: </B></font></TD>
<TD><TEXTAREA rows=5 cols=49 name=email_message class=small_txt></TEXTAREA></TD></TR>
</Table>
<P></P>
<input type=submit value="Submit Info" class=small_txt>
</form></font></center>
</div>
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]