Sending an HTML form to Email Address using PHP?

What PHP code would I put on the send.php file to send it?

Page 1 of 1

1 Replies - 1408 Views - Last Post: 22 June 2009 - 01:00 PM Rate Topic: -----

#1 Ryanmiller   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 21-June 09

Sending an HTML form to Email Address using PHP?

Post icon  Posted 22 June 2009 - 01:26 AM

I have an html form:

<form method="post" action=""> 
<table  width="70%" cellpadding="{$config.cellpadding}"  cellspacing="{$config.cellspacing}" border="0" align="center" style="text-align: center;">

<tr><td valign="top" width="30%">Name:<br /></td><td width="70%" valign="top"><input name="name" type="text"></td></tr>
<tr><td valign="top" width="30%">Email Address:<br /></td><td width="70%" valign="top"><input name="email" type="text"></td></tr>
<tr><td valign="top" width="30%">Message:<br /></td><td width="70%" valign="top"><textarea name="message" rows="15" cols="40"></textarea></td></tr>
<tr><td valign="top" width="30%"></td><td width="70%" valign="top"><input type="submit" name="Submit" alt="Submit"></td></tr>

What would the PHP look like on contact_us_send.php to send all of three of those fields to [email protected]? I have read six tutorials on how to do this but still am not getting it right, sorry and thanks!!!!

Is This A Good Question/Topic? 0
  • +

Replies To: Sending an HTML form to Email Address using PHP?

#2 crazyjugglerdrummer   User is offline

  • member icon

Reputation: 124
  • View blog
  • Posts: 690
  • Joined: 07-January 09

Re: Sending an HTML form to Email Address using PHP?

Posted 22 June 2009 - 01:00 PM

Just a matter of putting things in the right place in the mail function (I'm new to PHP, so this snippet might be a little off)
mail( $POST["email"], "subject here", $POST["name"] . " " . $POST["message"] );

no need to be sorry, we're here to help! :D
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1