<form name='forget' action='forget.php' method='POST' onsubmit="return ValidateContactForm();">
<h1 align="center"><strong>Forget STP ID </strong></h1>
<table width="504" height="134" align="center" bgcolor="#FFFF66">
<tr>
<td width="148" height="36"><div align="center"><strong>Enter Email ID<font color="#FF0000">*</font></strong></div></td><td width="344"><input type='text' id='b_email' name='b_email' size="40" ></td>
</tr>
<tr><td height="39" colspan="2"><div align="center">
<input type='Submit' value='Submit'>
</div></td>
</tr>
</table>
</form>
now create forget.php
<?php
// For Localhost connection
define('USER','root');
define('PASSWORD','');
define('HOST','localhost');
define('DATABASE','robo');
$dbname = DATABASE;
$dbc = @mysql_connect(HOST,USER,PASSWORD) or die('Could not connect to mysql '.mysql_error());
@mysql_select_db(DATABASE) or die('Could not select the database '.mysql_error());
$b_email=$_POST['b_email'];
$query=mysql_query("SELECT * from tbltransaction where b_email='$b_email'");
@$b_name=mysql_result($query,0,"b_name");
@$refno=mysql_result($query,0,"refno");
@$course_name=mysql_result($query,0,"course_name");
@$batch_date=mysql_result($query,0,"batch_date");
echo "<tr><td> $b_name</td><td>RST/STP/$refno</td><td> $course_name</td><td>$batch_date</td></tr>";
?>
</table></td></tr></table>
No comments:
Post a Comment