|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Article Discussion: Building a Members Area With PHP: Part 4/6
If you have any questions or comments about this article then please post them here.
This forum post relates to this article |
|
#2
|
|||
|
|||
|
very nice
i am having one problem at the moment and that is users not being remembered. I don't know if this is because the code is not working or because of tripod but I am gonna work on it before I ask for help. Anyways another quality article ben, can't wait for the last two. phantom |
|
#3
|
|||
|
|||
|
it doesnt remember me also
![]() and where do i get the full source code of the article (1-4)? i think i messed around to much with mine heh |
|
#4
|
|||
|
|||
|
its on the last page of articles 1, 2 & 4
|
|
#5
|
|||
|
|||
|
gxm...
you say that your support page help me to get full code of this and others scripts, BUT i and many more your guests downloading your support i saw abrakadabra (compressed file). We can't view it. Rebuild your support!!! |
|
#6
|
|||
|
|||
|
Ben, hope you had a nice xmas and that you're back....
Noticed that this thread is slowly dying....Please let's keep it going!
Have been working on it since the beginning, still don't get it all but am slowly but surely getting the hang of it. Interesting material. Any chance of seeing the next 2 articles in the foreseeable future? Thanks and best wishes for a healthy 2003! Martin The Netherlands |
|
#7
|
|||
|
|||
|
Quote:
URL [Articles 1&2] URL [Articles 3] And they work because i have tested it, if your getting a compressed file, thats because the file is ziped. I'll be finishing off the articles shortly. |
|
#8
|
|||
|
|||
|
Can anybody see the problem here.
The scriptperforms all functions - recognising me as being logged in but not storing a sessionid against the user is the user database named "gd_user", or writing the cookie for the session after logging in. It does seem to log you in however I have also renamed the mysql table from Bens article for the sessions as gd_session to suit the database. I think the problem might lie somewhere in me having used code from a) the earlier 2 parts of the article, then b) the 4th article, but I cannot see where I am nuking the whole thing. Have you guys at devArticles thought of writing a sleepdprivationscriptdebuggerPro for times like now? Now I'll buy that for a dollar! (Total Recall - go Arnie!!) |
|
#9
|
|||
|
|||
|
Login.php
I've downloaded the scripts, debugged with echo, and read through the forums for article 1,2,and4 but am still having problems getting a "Couldn't start new session" error. The registration is obviously working, the new users are added into the database table but the session info isn't coming through.
If I look at the Log database, however, I see entries like: Login OK: [username], 1, [firstname], [ipaddress], 24/01/2003 09:59:01 AM (where [username] = my user name, [firstname] = my firstname, [ipaddress] = my ip) The support files for 1&2 don't give a login.php so I eventually tried using the login.php from supportfile from article 4. The one thing I'm wondering is maybe I have a StoreSession problem from the class.security.php file. function Security() { $this->__LogTableName = 'tbl_Logs'; $this->__StoreSessionTableName = 'tbl_UserSession'; $this->__ExtraFieldNames = ''; $this->__FieldNameSess = 'sessId'; $this->__FieldNameUserId = 'userId'; $this->__FieldNameUser = 'username'; $this->__FieldNameSec = 'auth'; these values be renamed so that 'tbl_Logs' is replaced with 'log' (the name of the table in my database) and 'tbl_UserSession' be replaced by 'session' (the name of the session table in my database)? Would I also change the 'sessId', 'userId' to the relevant values within the session table? ('sessionid' and 'userid')? Many thanks, J |
|
#10
|
|||
|
|||
|
Hi,
The login script and creating a session and cookie all work. But when a user checks "remember me", they will get a cookie with the sessionid, but in the CheckCookie() function will stop at the following line: PHP Code:
I also discovered that when you alter the users Table to add the "sessionid" column, you use: PHP Code:
but in the CheckCookie() function sqlQuery it reads: PHP Code:
session should become sessionid, anyway i would appreciates some help with why i get stuck at the marked line above, thanks
__________________
regards, Fulton |
|
#11
|
|||
|
|||
|
DDDooGGG there is another error in the code:
you have to add PHP Code:
The corrected CheckCookie() function: PHP Code:
Excellent article. Too bad the posted code in the support files needs a lot of additional debugging. Q |
|
#12
|
|||
|
|||
|
Just to note, that I will be writing the final part of this article today, as well as reviewing the previous articles for bugs, ect.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > Article Discussion: Building a Members Area With PHP: Part 4/6 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|