Cookies

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
Gramps
-


Joined: 04 Jan 2006
Posts: 1

PostPosted: Wed Jan 04, 2006 8:26 pm    Post subject: Cookies Reply with quote

New to this site and dumb as a doorknob. Is there a tutorial for setting cookies? Sure would like to know how.
Thanks,
Gramps (Too old to know what you young geniuses are up to)
Back to top View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Wed Jan 04, 2006 8:30 pm    Post subject: Reply with quote

Try www.google.com and search for PHP cookies, there are lots of tutorials for you to look at.
_________________
Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk
Back to top View user's profile Send private message Visit poster's website
cmxflash
-


Joined: 11 Dec 2004
Posts: 872

PostPosted: Wed Jan 04, 2006 11:01 pm    Post subject: Reply with quote

It's pretty simple.

Here's how you write a cookie, using PHP:
Code:

<?php
setcookie("The name of the cookie", "The content");
?>

Note: This code must be in the beginning of the code.

And if you want to read a cookie:

Code:

<?php
$cookie = $_COOKIE['The name of the cookie'];

echo $cookie;

?>


If you want to read more about cookies, visit http://se.php.net/manual/sv/function.setcookie.php
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group