<?  ob_start();
session_start();
require_once("../dbconnect.php");
if($_POST['emailaddre']!="")
{
$query="select * from admin where email='".$_POST['emailaddre']."'";
$exe=mysql_query($query);
$num=mysql_num_rows($exe);
$row=mysql_fetch_array($exe);
if($num>0)
{
$uname=$row['user_name'];
$pass=$row['password'];
$email=$row['email'];

$from1 = "info@sisboxusa.com";
$headers = "From: ".$from1; 

$message.="YOUR USER ID AND PASSWORD\n\n";
$message.='User Name : '.$uname."\n";
$message.='Password  : '.$pass."\n\n";


$email_to = "To: ".$email;
$headers = "From: ".$from1; 
$email_subject = "Admin Password from sisboxusa.com"; 
mail($email_to,$email_subject,$email_message,$headers); 
header("location:resendpassword.php?s=suc");
}
else
{
header("location:resendpassword.php?n=no");
}
}
else
{
header("location:resendpassword.php?f=yes");
}



    ?>