16, October 2008

cookie is set -> but doesn't remember login - webmaster forum

 
Webdigity webmaster forums
This forum shares its ad revenue with its members!
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: cookie is set -> but doesn't remember login
« previous next »
Pages: [1] Print

Author Topic: cookie is set -> but doesn't remember login  (Read 1416 times)
Atari ST fan
*
Posts: 7
54 credits
Members referred : 0


« on: Jul 08, 2006, 04:04:20 AM »

Hello again Olaf!

I have just noticed that on the login page - if I check the box to "Remember Login", the cookie is set,
however - you still have to login to the page if I quit the browser.

I'm not sure what is wrong? What I have below is close to what is in the original files... am I missing anything?

Here is what I have on the login page

Code:
if (isset($_POST['Submit']) or isset($_POST['Submit_x'])){
$my_access->save_login = (isset($_POST['remember'])) ? $_POST['remember'] : "no"; // use a cookie to remember the login
$my_access->count_visit = true; // if this is true then the last visitdate is saved in the database
$my_access->login_user($_POST['login'], $_POST['password']); // call the login method
}

and this is the checkbox code

Code:
<input type="checkbox" name="remember" value="yes"<?php echo ($my_access->is_cookie == true) ? " checked" ""?>>

Thanks once again
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6357
38966 credits
Members referred : 374


It's time to use PHP5!


« Reply #1 on: Jul 08, 2006, 09:40:21 AM »

Do you accept an automatic login like in this forum?

this is not the function, the cookie will "auto fill" the formfields only...


Last blog : Upload images for usage in TinyMCE
Atari ST fan
*
Posts: 7
54 credits
Members referred : 0


« Reply #2 on: Jul 08, 2006, 12:11:24 PM »

Yes - I mean like in this forum.

But if its not in the class thats ok  Smiley -

yet it's not auto-filling for me either. 
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6357
38966 credits
Members referred : 374


It's time to use PHP5!


« Reply #3 on: Jul 08, 2006, 04:41:36 PM »

for me it works like:
if cookie is set I don't have to enter login and password, just hit the submit button...


Last blog : Upload images for usage in TinyMCE
Atari ST fan
*
Posts: 7
54 credits
Members referred : 0


« Reply #4 on: Jul 09, 2006, 03:53:00 AM »

found it! - i just had to change the cookie path in db_config.php
duh!
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6357
38966 credits
Members referred : 374


It's time to use PHP5!


« Reply #5 on: Jul 09, 2006, 08:57:45 AM »

found it! - i just had to change the cookie path in db_config.php
duh!

Smiley


Last blog : Upload images for usage in TinyMCE
What a dork
*
Posts: 17
110 credits
Members referred : 0


« Reply #6 on: Aug 11, 2006, 04:09:04 PM »

found it! - i just had to change the cookie path in db_config.php
duh!


Olaf (or Rafi), where to was the cookie path changed. I am a real newbie and my cookie doesn't seem to work. The current path is APPLICATION_PATH or /classes/access_user/. Everything else seems to work. Would one of you like to give me some pointers here?
« Last Edit: Aug 11, 2006, 04:12:31 PM by scooter »
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6357
38966 credits
Members referred : 374


It's time to use PHP5!


« Reply #7 on: Aug 11, 2006, 05:23:34 PM »


Olaf (or Rafi), where to was the cookie path changed. I am a real newbie and my cookie doesn't seem to work. The current path is APPLICATION_PATH or /classes/access_user/. Everything else seems to work. Would one of you like to give me some pointers here?

Scooter, (is this the german guy?)
in which folder are the protected folders? If you're not sure then use this one "/"


Last blog : Upload images for usage in TinyMCE
What a dork
*
Posts: 17
110 credits
Members referred : 0


« Reply #8 on: Aug 12, 2006, 12:55:42 PM »

Yes Olaf it's me. Thanks for helping me again. I was totally not hip with the php.ini file, but your answer let me into that as well. Yes, how did you guess I was German?
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6357
38966 credits
Members referred : 374


It's time to use PHP5!


« Reply #9 on: Aug 12, 2006, 02:48:11 PM »

Yes Olaf it's me. Thanks for helping me again. I was totally not hip with the php.ini file, but your answer let me into that as well. Yes, how did you guess I was German?


you get it wrong, its about the access_user config file setting:

define("COOKIE_PATH", "/");

with this setting the cookie is valid over your whole website.

I thought you're a dutch guy (you know chello.nl), but the only scooter I know is the german DJ (Fuck the milenium, god is a DJ) and the scooter driven mostly by teenies. The last one is not really cool as nick name Wink

by the way, it looks like that german people living in the netherlands are the biggest Fan's from Scooter...


Last blog : Upload images for usage in TinyMCE
What a dork
*
Posts: 17
110 credits
Members referred : 0


« Reply #10 on: Aug 14, 2006, 02:12:57 AM »

It is an honour to be seen as German but it's Dutch here. I am sorry to let you believe I was German, but I was just curious to what you let to say that.
« Last Edit: Aug 14, 2006, 12:20:40 PM by scooter »
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6357
38966 credits
Members referred : 374


It's time to use PHP5!


« Reply #11 on: Aug 14, 2006, 09:26:05 AM »

Grin please don't post so much offtopic content here, it's about the unrelated links (bad for SEO), use the pm for this maybe you will edit your post.

about the german thing, I'm from europe Wink


Last blog : Upload images for usage in TinyMCE
What a dork
*
Posts: 17
110 credits
Members referred : 0


« Reply #12 on: Aug 14, 2006, 12:23:43 PM »

I sanitized my message.
So what is SEO?
What is pm?

I am from Europe too, literaly  Wink.
Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6357
38966 credits
Members referred : 374


It's time to use PHP5!


« Reply #13 on: Aug 14, 2006, 02:39:11 PM »

Quote
So what is SEO?
search engine optimization Visit through proxy
Quote
What is pm?
private message Visit through proxy



Last blog : Upload images for usage in TinyMCE
Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=3193
Tags : php forums cookies browsers php.ini Bookmark this thread : Digg Del.icio.us Dzone more....

Topic sponsors:
Get a permanent link here for $1.99!


Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP  >  PHP classes @finalwebsites.com  >  Access_user Class (Moderator: Olaf)
Topic: cookie is set -> but doesn't remember login
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
Oct 16, 2008, 06:20:25 AM





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!





Readers

Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2008 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.