Htpasswd and cookies help.
Hello all, I have a webapp for the iPad and it requires validation to know if the user purchased it. What is happening now is that when the user goes to the webapp, they are asked to login via an htpasswd file. However, they are always asked this and it gets annoying for them. So, I need something that goes like this:
1.) User goes to the login page.
2.) User enters their password.
3.) User is able to view the login page which sets a cookie and has a link to the webapp.
4.) User clicks link, is taken to the webapp.
5.) The webapp page then checks to see if the cookie is present, if so, it loads the content. If it's not, it redirects the user back to the login page.
I have a custom jQuery cookie script that I like to use to set cookies, and I can post it here if anyone will help me with this. It doesn't seem like a very hard task either, it's just PHP is not my preferred writing language. I will someday learn it, but not today. Thank you.