hello...
i am doing login verification. there is tabs in index page thats why i am choosen this. actually after entering the values of email and password how to check that values are in database or not using javascript. and i will show message in alert box.
this is my script.
<script type="text/javascript">
function manage_validate()
{
if(window.document.manageaccount.managajob.value=='Employer')
{
<?
$emp_select=mysql_query("select * from employer_registration where email='"+email+"' && password='"+password+"' && status=1");
$emp_num=mysql_num_rows($emp_select);
if($emp_num<=0)
{
?>
alert("You Are Entered Wrong Details");
window.document.manageaccount.email.select();
return false;
<?
}
?>
}
if(window.document.manageaccount.managajob.value=='Work seeker')
{
<?
$ws_select=mysql_query("select * from workseeker_registration where email='"+email+"' && password='"+password+"' && status=1");
$ws_num=mysql_num_rows($ws_select);
if($ws_num<=0)
{
?>
alert("You Are Entered Wrong Details");
window.document.manageaccount.email.select();
return false;
<?
}
?>
}
else return true;
}
</<script>