Thread: Contact form
View Single Post
Old Aug 21st, 2007, 1:21 AM   #5
Kelvoron
Programmer
 
Kelvoron's Avatar
 
Join Date: Aug 2007
Location: Ohio
Posts: 46
Rep Power: 0 Kelvoron is on a distinguished road
firstly make sure your host supports PHP if it dosent go here: http://cp1.runhosting.com

then try this

save as: Home.XHTML
<Form method="post" action="sendmail.PHP">
Email: <input name="email" type="text" /> <br />
Message:<br />
<textarea name="message" rows="15" cols="40">
</textarea> <br />
<input type="submit" value="submit"><br />
</form>

Save as: sendmail.PHP <-- make sure that this file is exacly the same as the one you use in the action part above or it will not run.

make sure you replace yourMail@yourhost.com with your email address.
<?
  $email = $_REQUEST['email'];
  $message = $_REQUEST['message'];

   mail( "yourMail@yourhost.com", "Feedback Form Results",
      $message, "From: $email");
     header( "Location: http://americanvideo.mywebcommunity.org/");
?>
__________________
Good better best, never let it rest, untill your good is better and your better is the best.
Kelvoron is offline   Reply With Quote