I am sending an ajax request to a php file as shown here:
function checkDB(code, userid) { $.ajax({ type: \"POST\", url: \"
usually sending your data like this helps:
data: { code: code, userid: userid }
the most important thing to not forget is to verify if the name of the variables you are sending are the same in the server side