Location: PHPKode > projects > EasyFest > new/forgetPassword.php
	header("Expires: Thu, 17 May 2001 10:17:17 GMT");    // Date in the past
	header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified
	header ("Cache-Control: no-cache, must-revalidate");  // HTTP/1.1
	header ("Pragma: no-cache");                          // HTTP/1.0

//.............finalised code......
$title="Forget Password Page";

// value sent from form
if( isset( $_POST['email_to'] ) ) 
//echo $email_to;
// table name

// retrieve password from table where e-mail = $email_to(hide@address.com)
$sql="SELECT Password FROM $tbl_name WHERE EmailId='$email_to'";
echo $sql;

// if found this e-mail address, row must be 1 row
// keep value in variable name "$count"

// compare if $count =1 row


// keep password in $your_password

// ---------------- SEND MAIL FORM ----------------

// send e-mail to ...

// Your subject
$subject="Your password here";

// From
$header="from: hide@address.com";

// Your message
$messages= "Your password for login to our website \r\n";
$messages.="Your password is :$your_password \r\n";
$messages.="more message... \r\n";

// send email
$sentmail = mail($to,$subject,$messages,$header);


// else if $count not equal 1
else {
echo "Not found your email in our database";

// if your email succesfully sent
$msg="Your Password Has Been Sent To Your Email Address.";
else {
$msg="Cannot send password to your e-mail address";

<script type="text/javascript">
window.location="user_login.php?msg=<?php echo $msg;?>";

<?php } ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

Design by Free CSS Templates
Released for free under a Creative Commons Attribution 2.5 License

Name       : Premium Series
Description: A three-column, fixed-width blog design.
Version    : 1.0
Released   : 20090303

<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<?php /*doCSS();*/ ?>

<title>Premium Series by Free CSS Templates</title>
<meta name="keywords" content="" />
<meta name="Premium Series" content="" />
<link href="default.css" rel="stylesheet" type="text/css" media="screen" />
    <link type="text/css" href="menu.css" rel="stylesheet" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="menu.js"></script>
	<script type="text/javascript" src="ajaxfunction.js"></script>
<!-- start header -->
<div id="header">
	<div id="logo">
		<h1><a href="#"><span>Easy</span>Fest</a></h1>
	<div id="menu">
		<ul class="menu">

<!-- end header -->
<div id="wrapper">
	<!-- start page -->
	<div id="page">
		<div id="sidebar1" class="sidebar">
				<h2>Reset Password </h2>
					    <div class="loginBox">
<form action="<?php print $_SERVER["PHP_SELF"]; ?>" method="POST">
    <table align="center" style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; color:#000000;">
        <td>Email ID :</td>
        <td><input type="text" name="email_to" value="" maxlength="45"></td>
        <td><input name="submit" type="submit" ></td>
		<!-- start content -->
        <div id="prtCnt" align="center">
          <div id="content" align="center">
			<div class="flower"></div>
			<div class="post">
				<h1 class="title"><a href="#">Welcome to EasyFest</a></h1><div class="entry">
			    <p align="justify"><strong>College festivals have emerged as a booming business opportunity for prominent brands to establish their presence in a predominantly youth driven market. As the magnitude and level of fests increases with each passing year there grows a need for a system that centralizes the various aspects of a fest be it accounts, public relations or hospitality. So here is a one stop solution to all your management needs - EasyFest festival management system. </strong></p>

        <!-- end content -->
		<!-- start sidebars -->
		<!-- end sidebars -->
	  <div style="clear: both;">&nbsp;</div>
	<!-- end page -->
<div id="menu">
		<ul class="menu">

<div id="footer">
	<p class="copyright">&copy;&nbsp;&nbsp;2009 All Rights Reserved &nbsp;&bull;&nbsp; Design by <a href="http://www.freecsstemplates.org/">Apoorv Agrawal</a>.</p>
	<p class="link"><a href="#">Privacy Policy</a>&nbsp;&#8226;&nbsp;<a href="#">Terms of Use</a></p>
    <div id="copyright">Copyright &copy; 2010 <a href="http://apycom.com/">Apycom jQuery Menus</a></div>
Return current item: EasyFest