I\'m trying to send back multiple variables from a php file to ajax using json in an array. The code in the php file works perfectly and does everything with my database lik
Common issue is that browser prints "something else" before JSON whether that is some readable or unreadable(invisible) char. Try doing something like this:
$realid, "un" => $username, "date" => $date));
?>
Now, all supplement data (before JSON) will be discarded and you should have it working...