To give a basic overview:
So it sounds like you already have a .php page that contains a Hype animation?
Typically the PHP code would write out some javascript that will store the User ID in some variable. Are you doing this part already? It would be something vaguely equivalent to:
<?php
echo "<script>\n";
echo "var userID = \"".$userID."\";\n";
echo "</script>\n";
?>
So given that, you could then generate an AJAX request using the javascript userID variable from above. You'd probably want to do this early on; I'd recommend using the first scene's On Scene Load event, since this makes it a bit easier to talk to the Hype document.
In the response handler, then you could store any responses, and also set values within elements on the current scene (making sure to set Unique Element IDs or Class Names on them) or invoke specific Hype API functions. This part depends a bit more on what you want to do and your overall scene setup.
There's of course many different ways to go about it, but this is a general flow.
Tools like @MaxZieb's mentioned Hype Data Magic also help a lot with the mechanics of getting data in/out.