GIF89a
<?php ob_start(); ini_set('error_reporting', E_STRICT); include("connect.php"); mysqli_set_charset($conn,'utf8'); date_default_timezone_set('Asia/Kolkata'); $url='https://printlyte.in'; $mob=$_POST['mob']; $sql="SELECT * FROM `admin_user` WHERE `emailid`='".$mob."'"; $rs=mysqli_query($conn,$sql); $check=mysqli_num_rows($rs); if($check>0) { $row=mysqli_fetch_assoc($rs); $to = $mob; $subject = "Password Recovery"; $message = " <html> <head> <title>Password Recovery</title> </head> <body> <p>Hello Sir,<br><br> Your have made a password recovery request. <br> Your password is: <u>".$row["password"]." </u>, You can login from here : ".$url."/admin.cpanel/loginUser.php <br><br> </p> <br><br><img src='icons/logo2.png' style='width:100px; height:60px'><br><br> <small>mail server : <a href='http://techeor.co.in/'>Techeor Technology</a></small> </body> </html> "; // Always set content-type when sending HTML email $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; // More headers $headers .= 'From: <password.recovery@gmail.com>' . "\r\n"; $headers .= 'Cc: '.$mob. "\r\n"; $data=mail($to,$subject,$message,$headers); if($data>0){ echo '<script>alert("Dear user, Your password has been send. Please check your given email id for password recovery");</script>'; echo '<script>window.location.href="loginUser.php";</script>'; } else { echo '<script>alert("Dear user, system is unable to send password. please try again later");</script>'; echo '<script>window.location.href="forgetpassword.php";</script>'; } } else { echo '<script>alert("Invalid Credentials...");</script>'; echo '<script>window.location.href="forgetpassword.php";</script>'; } ?>