Email form send

Links for php scripts

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Thu Feb 28, 2013 6:44 am

Email form send

Postby graemeb » Thu Feb 28, 2013 6:46 am

Rather new to php and this works but how i make from/send field appear in email instead of server.

if(isset($_POST['submit'])) {
$to = 'info@*******.com' ; //put your email address on which you want to receive the information
$subject = 'EncSec Form Enquiry'; //set the subject of email.
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$message = "<table><tr><td>Full Name</td><td>".$_POST['name']."</td></tr>
<tr><td>Company Name</td><td>".$_POST['company']."</td></tr>
<tr><td>E-Mail Address</td><td>".$_POST['email']."</td></tr>
<tr><td>Contact Number</td><td>".$_POST['contact']."</td></tr>
</tr></table>" ;
mail($to, $subject, $message, $headers);
header('Location: ******-********.html');

Thank you

Return to “PHP Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest