Your Ad Here
1

How to set cookies in php?

Posted by The Blogger on 12:40 PM in
Answer:

setcookie(’variable’,'value’,'time’);
variable – name of the cookie variable
value – value of the cookie variable
time – expiry time
Example: setcookie(’Test’,$i,time()+3600);

Test – cookie variable name
$i – value of the variable ‘Test’
time()+3600 – denotes that the cookie will expire after an one hour

tags: php interview questions and answers, php interview question How to set cookies in php, How to set cookies in php

1 Comments


Core PHP interviews questions and answers for freshers and 1 to 5 years experience candidate.Learn tips and tricks for crackingPHP interviews questions .Coding tag will guide you the best e-learning website that cover all technical and learn technical tutorial based on different languages.


Post a Comment

Your Ad Here

Copyright © 2009 Interview Questions and Answers