My webapp has a login/logout function, In safari of iphone I can't logout, it seems like my php script can't cancle cookie
€8-30 EUR
Preklicano
Objavljeno pred skoraj 6 leti
€8-30 EUR
Plačilo ob dostavi
I create a login/logout function for my web project with php, It works fine with browser in pc and browser in Android. But in iphone it dosen't work, some time I can not logout, it seems like my php script can't cancle cookie.
I use this code for login by setting cookie:
session_start();
setcookie("us", $email, time() + (86400 * 30), "/", $_SERVER['SERVER_NAME'], isset($_SERVER["HTTPS"]), true);
setcookie("ps",$password, time() + (86400 * 30), "/", $_SERVER['SERVER_NAME'], isset($_SERVER["HTTPS"]), true);
I use this for logout by cancle cookie:
session_start();
setcookie("us", null, time()-3600, "/", $_SERVER['SERVER_NAME'], isset($_SERVER["HTTPS"]), true);
setcookie("ps", null, time()-3600, "/", $_SERVER['SERVER_NAME'], isset($_SERVER["HTTPS"]), true);
setcookie("PHPSESSID", null, time()-3600, "/");
$_SESSION = array();
session_unset();
session_destroy();
header('Location: [login to view URL]');
When start my page the php will check if there is cookie for login automatic:
session_start();
if(isset($_COOKIE["us"])){
//verify this user...
}
Hello There,
I had read your job description and I know about the problem.
There is no problem in your code, Iphone is not allow to save cookie.
So you need to change the function from cookie to session in PHP.
I can do this for you.
€29 EUR v 1 dnevu
4,9 (244 ocen)
7,8
7,8
5 freelancerjev je oddalo ponudbo s povprečno vrednostjo €21 EUR za to delo
We have a team of Skilled PHP professionals with expertise in Laravel, Codeigniter, Magento, WordPress and other open source packages.
We are available from Monday To Friday, 9 hours a day. Our timezone is GMT+5.30.
Please start communication to discuss.
You will be able to directly communicate with our technical expert.
By doing this work, we are interested in developing long term relationship by displaying our quality.
Thanks for reading our proposal.
Regards.
Hello Sir/Mam. I am a Computer Science Students and I am a passionate software developer. I am aware of all the latest technology trends. I have up to date skills in Latest Technologies and I am eagerly trying to satisfy my insatiable thirst for learning. If I am given an Opportunity to prove and improve my skills, I believe I can do wonders. My work Samples can be found on my GitHub profile. I try to write clean , Maintainaible Code and try to follow most coding guidelines. Please Consider me for this Role