dimanche 19 avril 2015

Why can't i see php call in Mozilla's Net tab?


$('#registerForm').submit(
function()
{
event.preventDefault();
callAjaxSubmitMethod(this);
}
);

function callAjaxSubmitMethod(form)
{
$.ajax({
type: "POST",
url: "lib/registration_validate.php",
data: $("#registerForm").serialize(),
dataType: 'json',
success: function(response)
{
console.log("cominggggg");
alert("s"+response.status);
},
error:function(response)
{
alert("e"+response.status);
},
complete:function(response)
{
console.log("Completed.");
}

});
}


This is how i am sending data to my php page.



<?php
include 'configdb.php';
session_start();
global $connection;
echo "oops";
if(isset($_POST['submit']) && $_POST['email']!='' && $_POST['password']!='')
{
$email= $_POST['email'];
$sql1 = "SELECT * FROM Users WHERE emailID = '$email'";
$result1 = mysqli_query($connection,$sql1) or die("Oops");
$response = array();
if (mysqli_num_rows($result1) > 0)
{
$response['status']='Email Already Exists';
echo json_encode($response);
exit;
}
}?>


I am just processing for duplicate email registration. If ia run this code in my chrome, i can see php in net tab. I can see completed in console and e200 in alert.


In my mozilla browser, i don't get any console strings, alerts. I din't get php page call in Net tab too.


I just cleared cache too. So it's not coming from cache too. I cleared localStorage due to out of memory error in my mozilla.


I don't even understand this behaviour. No idea to how to debug further.


Aucun commentaire:

Enregistrer un commentaire