|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Article Dicussion: Creating a Secure PHP Login Script
If you have any questions or comments about this article please post them here.
This forum post relates to this article |
|
#2
|
|||
|
|||
|
That was a great article! very quick and straight to the point.
Do you have that code for download? every time i try and cut and pate it gets really messy. I would love to use it ![]() |
|
#3
|
|||
|
|||
|
cookie bug
I don't know if I am doing wrong, but I tried and tested and with the code on the article, the cookie value will never be set on database, and setcookie function will never be called with updated cookie when user does "remember".
So when user do remember, it won't remember because the value is always null. How am I supposed to fix this problem? |
|
#4
|
|||
|
|||
|
Could someone tell me where and how i use these function in this article?
Can aybody plese leave a full example with HTML included? thanks.
__________________
regards, Fulton |
|
#5
|
|||
|
|||
|
member.class.php
Hi,
A good article, but I found that there are some omissions that make it unworkable out of the box. Here is my implementation of the class. All comments are welcome, and appreciated. At the moment the class will restore the login on instansiation, but i haven't managed to remove the 'remember' cookie so there is no way to log out at the moment ![]() Cheers Dave ----- Quote:
Last edited by Dave Cheney : September 28th, 2003 at 11:49 PM. |
|
#6
|
|||
|
|||
|
logout function
this seams to do the trick
function logout() { // blowup cookie setcookie('remember',time()-3600); $this->set_session_defaults(); } |
|
#7
|
|||
|
|||
|
db schema for above - slightly modified from the original posted in the article
CREATE TABLE `member` ( `uid` int(11) NOT NULL auto_increment, `username` varchar(20) NOT NULL default '', `PASSWORD` varchar(32) binary NOT NULL default '', `token` varchar(32) binary NOT NULL default '', `session` varchar(32) binary NOT NULL default '', `ip` varchar(15) binary NOT NULL default '', PRIMARY KEY (`uid`), UNIQUE KEY `username` (`username`) ) TYPE=MyISAM AUTO_INCREMENT=2 ; |
|
#8
|
|||
|
|||
|
Dave,
Thank you for posting your update to the Secure Log in Article on the devArticles site (back in Sept 2003). This is the most comprehensive code I have found. I am trying to implement it, but just have a few questions about when to call certain methods. Would you be willing to send me a skeleton of a couple of content pages that have the security calls in place? I am just having trouble with the "big picture" of how it all fits together. Your help would be greatly appreciated! Thanks, Kevin |
|
#9
|
|||
|
|||
|
Quote:
I second this motion. I'm trying to figure out the best way to check login status on the content pages, and bounce back to the login page if the session expires or if the user logs out. ::(`):: |
|
#10
|
|||
|
|||
|
Got error!
I've just read ur article and follow it as well. And I've received the following error:
Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in c:\inetpub\wwwroot\My Scripts\Login form\login.php on line 41 the line 41 in my script is $date=gmdate("'Y-m-d'"); Thanks |
|
#11
|
|||
|
|||
|
MySQL load
I need to build some authentication for a site of upwards of 1000 people. Is there going to be stress on the MySQL database if its accessed each time a secure page is accessed? Is there a way test this before I go online with it?
Thanks a lot. The Doctor. |
|
#12
|
|||
|
|||
|
Hi all,
I know its been a long time, but did anyone actually find out where exactly they need to put the function calls to this class within the HTML? Thanks Tryst
__________________
Tryst |
|
#13
|
|||
|
|||
|
Unserialize Problem
Has anyone else had any problems with the unserialize() function in this script?
Thanks Tryst |
|
#14
|
|||
|
|||
|
Its an old thread though after checkin out Daves class (nice) i just added a few lines to get it to work and since some people asked for examples on how to use it.. here we go: file: member_class.php PHP Code:
|