I created an IOS WebApp with password protected the main page(using php) and user have to type the password once per day. The password protected main page works on safari(ask for password once per day) but after adding it to Home Screen the WebApp keeps asking password each time i minimize the app and re open it . In another word the script doesn't remember the password from cookie so it keep asking it again if the app is minimized ! Could any one tell me why the webApp keep asking the password on minimization?Thanks in advance.
I added this on the top of my main page webApp:
<?php include("/protect.php"); ?>
And inside protect.php i take user name and password via form and save it on cookie after validation:
setcookie("verify", md5($login.'%'.$pass), $timeout, '/');
And this is how i check for cookie:
// check if password cookie is set
if (!isset($_COOKIE['verify'])) {
showLogin("");
}