$.ajax work around
$.ajax work around
$.ajax({
type: "POST",
url: "index.php?mc=projects&sc=add",
data: {domain:domain, ownerid:ownerid, supervisorid:supervisorid, startDate:startDate, pname:domain},
dataType:"html",
cache: false,
success:
alerts an error if domain has already a duplicate else returns true;
});
PHP:
$numRes = mysql_num_rows(mysql_query($query));
if($numRes > 0) {
echo 'Failure';
}else {
echo 'success';
}
Can you help me guys, i've been crazy doing this... I already tried using json but still failed..