ob_start(); session_start(); include('frclsi_admn_cp/operation.php'); $operation =new operation(); if($_REQUEST['send']=='Send') { extract($_POST); $rand=rand(0,999999); $_SESSION['token']=$rand; if(isset($_POST['myemail']) && $_POST['myemail']!=='') { $email='info@freeclassy.com'; $to=$_POST['myemail']; $subject='Freeclassy Password Rcovery'; $message=' Reset your password, and we will get you on your way. To change your Freeclassy password, click here http://freeclassy.com/reset_com_pwd.php?mail='.$_POST['myemail'].'&tok='.$_SESSION['token'].' This link will expire in 24 hours, so be sure to use it right away. Thank you for using Freeclassy.com! The Freeclassy Team '; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From:'.$email.'<'.$email.'>'. "\r\n"; $headers .= "Reply-To: ".$email."\r\n"; $headers .= 'Cc:sales@freeclassy.com' . "\r\n"; $mail=@mail($to, $subject, $message, $headers); } //$reg=$operation->forget_pwd($_POST,$_FILES); if($mail) { $msg="Congragulation.Your request compleated sucessfully.Please Wait for few seconds.We will send Your password to Youe email Id"; } else { $msg="Request not received or This Email id is not registerd yet Try Again"; } header('location:forgot_company_password.php?msg='.$msg); } ?>