I am sending an ajax request to a php file as shown here:
function checkDB(code, userid) { $.ajax({ type: \"POST\", url: \"
you should set your data like so :
data
data: 'code='+code+'&userid='+userid