require_once("conn.php"); require_once("includes.php"); require_once("templates/HeaderTemplate.php"); if(isset($_POST[u2])) { $q1 = "select * from yellow_agents where username = '$_POST[u2]' "; $r1 = mysql_query($q1) or die(mysql_error()); if(mysql_num_rows($r1) == '1') { //ok $a1 = mysql_fetch_array($r1); $to = $a1[email]; $subject = "Your password"; $message = "Hello $a1[FirstName] $a1[LastName],\nYour login details are:\n\nUsername: $a1[username]\nPassword: $a1[password]\n\nhttp://$_SERVER[HTTP_HOST]"; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/plain; charset=iso-8859-1\n"; $headers .= "Content-Transfer-Encoding: 8bit\n"; $headers .= "From: $_SERVER[HTTP_HOST] <$aset[ContactEmail]>\n"; $headers .= "X-Priority: 1\n"; $headers .= "X-MSMail-Priority: High\n"; $headers .= "X-Mailer: PHP/" . phpversion()."\n"; mail($to, $subject, $message, $headers); require_once("templates/ForgotYes.php"); require_once("templates/FooterTemplate.php"); exit(); } else { $error2 = "