I have three table :tutorregistration,studentregistration,Instituteregistration.Now I want to write forget password code for this:I know how to send mail for this,guide my logic approach is correct. if it is wrong,give me a correct code.
<form name="f1" action="" method="post">
<strong>Email</strong>
<input type="text" name="email" value="" class="buttonlength"/>
<strong>Password</strong>
<input type="password" name="password" value="" class="buttonlength"/>
<input type="radio" name="type" value="student" />Student <input type="radio" name="type" value="tutor" />Tutor <input type="radio" name="type" value="institute" />Institute</td>
<input type="submit" name="Submit" value="Submit" class="btn" id="submit"/>
</form>
In forget.php file:
<form name="f1" action="" method="post">
enter email:<input type="text" name="email" value=''/>
<input type="submit" name="Submit"/>
</form>
if(isset($_POST['Submit']))
{
$email = $_POST['email'];
$sqlstudent=mysql_query("SELECT * FROM studentregistration WHERE email='".$email."'") or die(mysql_error());
$row_rsinfo=mysql_fetch_assoc($sqlstudent))
$sqltutor=mysql_query("SELECT * FROM tutorregistration WHERE email='".$email."'") or die(mysql_error());
$row_rsinfo=mysql_fetch_assoc($sqltutor))
$sqlinstitute=mysql_query("SELECT * FROM Instituteregistration WHERE email='".$email."'") or die(mysql_error());
$row_rsinfo=mysql_fetch_assoc($sqlinstitute))
if(count($row_rsinfo)>=1)
{
//mail work here
}
}
?>
So far what I have tried.I have given,I know how to send mail for registered mail id.Here I want to know how to check which query is executing, check and give me the answer for this.