The first time a user logs into my app, I’d like to show them a jQuery dialog with general information.
To check whether a user has logged in, I can check the last_login field in the mySQL database–if it’s empty, then the user hasn’t yet logged in.
I also know how to setup jQuery dialogs.
But I don’t think I can use jQuery and mySQL together, so I’d like to know what others have used to solve this problem. I’ve looked at some of the other questions here on SO; haven’t found any that put the first-time login and the popup together.
I’m using Codeigniter for my framework.
When you’re validating login, just pass a parameter to the page saying that it’s the first login. So validate as normal, but just tell the page you get redirected to that it is the user’s first time (via that mysql column).
The page you view when you successfully login will check to see if that parameter is passed and, if it is, will pop the modal.
Look here to read about modals: http://jqueryui.com/demos/dialog/. You can set the variable in session, as mentioned, or you could pass it as a querystring parameter. You can use that variable to determine whether or not to fire the modal.