I've written some educational web apps (HTML, js) for my kids. I've gotten to the point where I need to start tracking their progress individually, so the apps can focus more on what the individual still needs to learn, and spend less time repeating what they already know well.
To do that, I've created a Drupal site, with logins for each of the kids. Once they log in thru Drupal, I would like to have my app call some php pages (which I will write) that access Drupal's authentication states.
So my question is, if I'm writing php pages that query or update a database, how can these pages first ascertain whether the user is logged in to Drupal on that site, and if so, get the name of the currently authenticated user?
Many thanks for any pointers.