7 ) { $sql="SELECT fname,lname FROM tbl_users WHERE email='".$_POST['uname']."'"; $sql_id = $DBLink->query($sql); list( $fname, $lname ) = $DBLink->next_record($sql_id); if( $DBLink->num_rows($sql_id) == 0 ) { $error_msg="There is no account with this detail or User name mismatch"; $error = 1; }else { $a = array("A","B","Z","P","E","R","H","W","F","L"); $new_pass = rand(100,999).$a[rand(0,9)].rand(100,999); update_password( $_POST['uname'], $new_pass ); $to = $_POST['uname']; $from_header = "From: webmaster@lankatopten.com\nReturn-Path: webmaster@lankatopten.com\n"; $msg = " Dear ".ucfirst($fname)." ".ucfirst($lname)."\n\n Your new password :".$new_pass."\n Please change this\n "; if( mail($to,'Sri Lanka Astrology :: Change password', $msg, $from_header)) { } $error = 0; } }else { $error_msg="Please fill correctly"; $error = 1; } } if( $previous_key != $_POST['skey'] and $error == 0 ) { $error_msg = "Please Enter your security key"; $error = 1; } function update_password( $uname, $pass ) { global $DBLink; $sql="UPDATE tbl_users SET passwd='".md5( $pass )."' WHERE email='".$uname."'"; $sql_id = $DBLink->query($sql); } header ('Content-Type: text/html; charset=iso-8859-1'); $category="astrology"; $title="LankaTopTen :: Sri Lanka Astrology"; $description="Sri Lanka online horoscope and Astrology web site"; $keyword="Sri Lanka astrology,sri lankan astrologers, babies names, lanka astrology, nakath, lagna, kendraya, online horoscope, daily horoscope, free horoscope, Predictions, yearly predictions, daily predictions, lagna predictions"; $root ="/var/www/html/lankatopten.com/"; $dir ="/var/www/html/lankatopten.com/directory/"; $common_dir ="/var/www/html/lankatopten.com/astrology/common/"; //include_once('include/config.php'); //include_once('include/DBManeger.php'); //$DBLink = new DBManeger(); //require("include/function.php"); require($common_dir."header.php"); ?>

  Forgot Password  

New password email to

Login
User Name ( Email )
Security Key :  
* Please enter this security number in text box before Submit