help contact form improvement

the mail() function

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 44
Joined: Tue May 28, 2013 10:04 pm
Location: India,Lucknow

Mon Jun 03, 2013 9:19 am

if ($_POST ['b_submit'])
$row1=mysql_fetch_array (mysql_query ("select from youraffliatetable where affliate_code='".$_POST ['aff_code']."'"));

$to =$row1 ['email'];
$subject ='Job Opportunity @ m`brace';
$message ='<head>
<title>Untitled Document</title>
<link href="../include/css/style.css" rel="stylesheet" type="text/css" />

your content
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";

// More headers
$headers .= 'From:'.$_POST['from']."\r\n";

echo "<script language='javascript'>window.location='?do=msg1'</script>";
<form name='asdf' method="post">
<input type='text' name='aff_code'>
<input type="submit" name="b_submit">

This will work out for you. Any problem do revert to me as i have done lot of coding like this


Post Reply