Ron's Guide
Sponsored Links
Tutorial Search:
Go!
Navigation
Home
Tutorials
HTML
CSS
PHP
JavaScript
Suggest
Submit
About
Contact
Contribute
Advertise
Poll
Would you be an active poster if Ron's Guide had a message board?
Yes, definitely!
No, I wouldn't.
I'm not sure.
Total Votes: 62
Comments: 18 —
View
Past polls
—
Poll idea?
Rate Ron's Guide
Rate our resource at
Bigwebmaster.com
10 (Perfect)
9 (Excellent)
8 (Very Good)
7 (Good)
6 (Above Average)
5 (Average)
4 (Below Average)
3 (Poor)
2 (Very Poor)
1 (Horrible)
Discuss Tutorial:
Cookies via PHP
14 Comments
Comment by
Ron
on
Feb 4, 2006, 8:07 am
Please post questions or comments about this tutorial below.
Comment by
Brian
on
Feb 7, 2006, 10:30 pm
Could I do something like
if($_COOKIE[\'blah\']){
echo \'logged in\';
}
to check if a cookie exists?
Comment by
Ron
on
Feb 7, 2006, 10:50 pm
If you want to check if the cookie exists use the
isset
function. Like this:
if(isset($_COOKIE[\'mycookie\'])) {
echo \"The cookie exists!\";
}
Comment by
Teco
on
Feb 9, 2006, 4:03 pm
Well play\'ed arround with this tut, and i\'m now using it on my site for my friendNet system to check login cookies...
Really nice Ron
Comment by
Bfr
on
Feb 11, 2006, 2:14 am
Another great tutorial, Ron. It was about time you made another tutorial
Comment by
Ron
on
Feb 16, 2006, 7:12 am
Excellent, Glad it was helpful Teco.
Thank you Bfr
Comment by
Kingjokin
on
Jul 9, 2006, 1:15 pm
Can i use form variables as perameters for my cookie. like to log a person in directly upon registration?
Comment by
Ron
on
Jul 10, 2006, 5:28 am
Yes, you could do that.
Comment by
Kingjokin
on
Jul 10, 2006, 9:47 pm
allright., how?
Comment by
Ron
on
Jul 11, 2006, 6:45 am
well, you could do something like:
<?php
setcookie('username', $_POST['username']);
?>
That would set the cookie "username" to the value of the username field passed through a post form.
«
Previous
[
1
2
]
Next
»
Post a comment
Sorry, you must be a registered member to post comments.
If you would like to register, you can do so
here
.
If you already have an account, please
login
.
Member Login
User:
Pass:
Forgot your password
? Not a member?
Registration
is free!
Newest members
Nimiflism
Expefrilildslipp
Appofeken
Nurogoota
Onewhitelite
Users Online
2
Visitors,
0
Members.