ok
Direktori : /home/keydecors/public_html/admin/pages/ |
Current File : /home/keydecors/public_html/admin/pages/forback.php |
<?php session_start(); include ('../model/dboperation.php'); $username = mysqli_real_escape_string($mysqli , $_POST['username']); $qry = "SELECT * FROM admin WHERE username = '".$_POST['username']."' "; $result = $mysqli->query($qry); $num = mysqli_num_rows($result); if ($num == 0) { header("Location:forgot.php?msg=2"); } else { if ($row = mysqli_fetch_array($result)) { $_SESSION['login'] = $row['username']; $pass = $row['password'];//FETCHING PASS //echo "your pass is ::".($pass).""; //$to = $row['username']; $to="sanoojktk@gmail.com"; //echo "your email is ::".$email; //Details for sending E-mail $from = "Goodwillcalicut.com"; $url = "http://goodwillcalicut.com/admin/"; $body = " password recovery ----------------------------------------------- Url : $url; email Details is : $to; Here is your password : $pass "; $from = "goodwillfile@gmail.com"; $subject = "Password recovered"; $headers1 = "From: $from\n"; $headers1 .= "Content-type: text/html;charset=iso-8859-1\r\n"; $headers1 .= "X-Priority: 1\r\n"; $headers1 .= "X-MSMail-Priority: High\r\n"; $headers1 .= "X-Mailer: Just My Server\r\n"; $sentmail = mail ( $to, $subject, $body, $headers1 ); } } echo "Recovery Mail Send " ?>