I have some code in script that gets some values and posts them to php which (i already know works) should add to the database but doesnt? just wondering whats going wrong, my guess is that its never actually getting to my php file? any ideas?
FB.Event.subscribe('auth.login', function(response)
{
FB.api('/me', function(response) {
$.post("usersignup.php", { facebookid: response.id, email: response.email, firstname: response.first_name, lastname: response.last } );
});
appropriate part of usersignup.php looks like this
mysql_select_db ($database);
$fbid = $_POST['facebookid'];
$fn = $_POST['firstname'];
$ln = $_POST['lastname'];
$em = $_POST['email'];
$query = "INSERT INTO user";
$query .= "(facebookid, firstname, lastname, email) VALUES ('$fbid','$fn','$ln','$em')";
$results = mysql_query($query, $link);
$mediaid = mysql_insert_id();