$find=false; if(isset($_POST["email"]) && !empty($_POST["email"])) { require "db_connect.php"; $query=mysql_query("select login,pass from user_act where iduser_palm in(select IntegerID from cadastro_act where AlphaID='SYSTEM-USER' and trim(lower(Email))= '$_POST[email]')"); while($res=mysql_fetch_array($query)) { $message_body="\n\nYour Login: ".$res["login"]."\nYour Password: ".$res["pass"]."\n\n\n\n"; if(mail($_POST["email"],"Gsync - Password Recover",$message_body,"From: gyansinc@gyansinc.com\r\nReply-To: gyansinc@gyansinc.com\r\nX-Mailer: PHP/".phpversion()."\r\n"."Precedence: list\r\n"."Importance: Normal\r\n"."X-Mailer: GSync version 1.0")) { $find=true; } } if($find) { echo " The password has been send to the email "; exit(); }else { echo "Email did't find "; } } ?> |