Re: Re: Testing if cookies are enabled
| From: | deseavers at mindspring dot com | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: Re: Testing if cookies are enabled | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-188799@lists.php.net to get a copy of this message | ||
Reading Aidan's e-mails is like watching a Disney movie. You can't help but feel warm and
fuzzy inside and loving toward the whole world.
Basically, create a page with an HTML form that takes the user name and password (or whatever login
information you think is appropriate). The action of the form could be the next page, which sets
the cookie. However, if you just want to have personalized data based on the login, you have some
other options, such as sessions and, even better in my opinion, accessing records in a database.
Aidan, in his loving way, pointed you to a good starting point for setting cookies: if you
haven't read the manual, it migh be helpful.
-----Original Message-----
From: Aidan Lister <aidan@php.net>
Sent: Jun 21, 2004 5:25 AM
To: php-general@lists.php.net
Subject: [PHP] Re: Testing if cookies are enabled
Think about it.
Step 1) Analyse the problem.
a) Set a cookie.
b) Test if the cookie has been set.
c) Display data from cookie
Step 2) Read the fucking manual
a) http://php.net/setcookie
b) http://php.net/setcookie
c) http://php.net/setcookie
If you can't work it out, and have actually done some reading, feel free to
ask for some more help.
"Martin Schneider" <cangoou@yahoo.de> wrote in message
news:20040621085845.29515.qmail@pb1.pair.com...
> Hello!
>
> I saw this on some pages and want to do the same:
>
> - On one page the user can login. Before that no cookie is set!
>
> - On the next page they set the cookie and show either the user data or
> a warning that the user has disabled cookies and should enable them.
>
> I wasn't able to set and text a cookie on the same page! How is it done?
>
> Martin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php