my index page
<script type="text/javascript">
$(document).ready(function(){
$("#first_name").blur(function() {
var first_name = $('#first_name').val();
var fathermobile = $('#fathermobile').val();
if(first_name=="")
{
$("#disp").html("");
}
else
{
$.ajax({
type: "POST",
url: "detail.php",
data: 'first_name='+ first_name +'fathermobile='+fathermobile,
success: function(html){
$("#disp").html(html);
}
});
return false;
}
});
});
and my detail.php
<?php
include("include/connect.php");
if(isset($_POST['first_name']) && isset($_POST['fathermobile']) )
{
$first_name=mysql_real_escape_string($_POST['first_name']);
$fathermobile=mysql_real_escape_string($_POST['fathermobile']);
$query=mysql_query("select * from candidate where first_name='$first_name'");
$row=mysql_num_rows($query);
if($row==0)
{
echo "<span style='color:green;'>Please Continue..</span>";
}
else
{
echo "<span style='color:red;'>Already Registered</span>";
}
}
?>
Please help me i am not getting data with multiple varibles in detail page