What's new

Closed cøøkíé vs session

GOOD TIPS?


  • Total voters
    3
Status
Not open for further replies.

RNA30

Honorary Poster
Joined
May 7, 2015
Posts
192
Reaction
103
Points
140
Age
25
PHP:
<?php
   setcookie("cøøkíé_name","cøøkíé_value",time()+60,"/");

   echo $_COOKIE['cøøkíé_name'];


   $_SESSION['session_name']="session_value";

   echo $_SESSION['session_name'];
?>

When you are using cøøkíé, you can set the expiry of it. So that if the cøøkíé did not meet the expiry you can access its value, even you open/close your browser. But when you are using SESSION you can't set the expiry of it and when you close your browser and open it again...the data you stored in session are lost. It will be deleted automatically when you left your browser.
 
T.S. curious lang ako, minsan tuwing nag visit ako ng mga websites tapos may nag pop-up na "this website using cøøkíés" cancel / OK safe ba ito ?
 
T.S. curious lang ako, minsan tuwing nag visit ako ng mga websites tapos may nag pop-up na "this website using cøøkíés" cancel / OK safe ba ito ?
Depende po sa site na nibi-visit nyo. Ang alam ko lang po kc ang cøøkíé ginanagamit para maretrieve ung data. Temporarily dito nila ini-store ung mga di naman gaanong complicated na data.
 
I think cøøkíé Expiry can only set up to 20 years, because I tried to set the cøøkíé to set("cøøkíé_name","cøøkíé_value",time()+630720000,"/");...and it is still working but when I multiply it to 5 it gives me 36 years back or the cøøkíé expiry set to 1981...
 
I think cøøkíé Expiry can only set up to 20 years, because I tried to set the cøøkíé to set("cøøkíé_name","cøøkíé_value",time()+630720000,"/");...and it is still working but when I multiply it to 5 it gives me 36 years back or the cøøkíé expiry set to 1981...
Ah, nice info po. Salamat sa pagshare.
 
Gyan ba sa cøøkíé naka save yung username at password? Kapag nag clear ako ng cøøkíés mag logout na account ko?
 
Opinion lang po ano...ang cøøkíé much better if ang user ay gumamit ng sarili nitong pc or any personal computing device used to connect the internet...kasi pwede ma store ang values ng any info ng user whether the browser is in execution or not...that is why may mga option ang mga website na "remember password"...yung session naman if you want your users to use their credential as long as they are using it or as long as users browser is open...

Nag cocoment lang para maka balik establish
 
cøøkíé VS Session

Depende po sa app na gagamitin or much specifically sa privacy ng page:
cøøkíé - kapag gusto mo maretain yung info or login status ng user sa specified time kahit iclose pa yung browser
Session - kapag gusto mo mawala yung logged in status kapag nagclose na ng browser
 
Status
Not open for further replies.
Back
Top