Reply
PHP Cookies
Old 04-27-2004, 08:47 AM PHP Cookies
Skilled Talker

Posts: 77
Location: London
I'm having problems with browsers and cookie, the thing is the cookies arnt liked by the users browser unless they turn their cookies down in Internet Options > Security.

Do cookie names have to be a specific way or do you have to do something so Internet Browsers accept these cookies?
lukedyson is offline
Reply With Quote
View Public Profile Visit lukedyson's homepage!
 
When You Register, These Ads Go Away!
     
Old 04-28-2004, 08:57 AM
Skilled Talker

Posts: 53
Cookies are incredibly unreliable. As you have noted, most browsers are set high enough to not accept them and the people who do accept them have become computer savvy enough to know they should clean cookies (and other things) on a regular basis.

Unless you're just looking to add basics for returning visitors (such as "welcome back username"), I'd look for another solution to track returning visitors.

Just my TWO cents. :-)

Jim Webster
www.iDevDirect.com
iDevDirect.com is offline
Reply With Quote
View Public Profile
 
Old 04-28-2004, 10:29 AM
Lippy's Avatar
LipWeb.Net

Posts: 270
A good method would be IP address though, like cookies this has its fault to. As many ISPs have dynmic IP addresses for clients, it will record thier IP but it would only work if that user has the same IP every time.
__________________
LipWeb.Net "Less Lip More Service"
Providing Quality Hosting at Fair Prices
AIM: LipWebNet MSN: daniel[at]lipweb.net Yahoo: LipWebNet ICQ: 265771633
Lippy is offline
Reply With Quote
View Public Profile Visit Lippy's homepage!
 
Old 04-28-2004, 11:56 AM
Skilled Talker

Posts: 77
Location: London
I have a login system with cookies
lukedyson is offline
Reply With Quote
View Public Profile Visit lukedyson's homepage!
 
Old 04-29-2004, 08:25 AM
Skilled Talker

Posts: 53
You need to be using sessions for your login system, not cookies. The only way a cookie relates to a login system is possibly auto filling the user/pass -or- auto logging returning customers (if they accepted your cookies, just like webmaster-talk.com does).

Your login page will look "similar" to this:

session_start();
if ($login) {
$valid_user = $username;
session_register("valid_user"); }

On any pages you want protected by login, just add this at the top of the page:

session_start();
if (!session_is_registered("valid_user")) {
header("Location: login.php"); }
Content for logged people will go here.

Realize this is a very basic sample. I'd do some reading on sessions.

Jim Webster
http://www.idevdirect.com/
iDevDirect.com is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to PHP Cookies
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12310 seconds with 13 queries