I am trying to pass a variable from javascript to PHP using a an AJAX request [$.get] but am getting nothing through the $_GET method. I am wondering why the variable email won't pass even though there is a value within it.
fetch.js
email = resp.emails[i].value;
$url = 'login.php'; //this file is on the same directory as fetch.js
//AJAX
$.get($url, {name: email});
login.php
$googleid = $_GET['name'];
echo $googleid; //nothing showing
If you need any more details please don't hesitate to ask.
EDIT I know I am going to get flamed for this but this was a typo. In my script I didn't make this mistake.