|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#31
|
|||
|
|||
|
Great
Thx ![]() |
|
#32
|
|||
|
|||
|
Ive got no idea why it happened either?
|
|
#33
|
|||
|
|||
|
ah ...
hi again ! until now i could fix some problems. i can login, the data stored in the tables is correct now so everything works fine. the problem is : when i log in, i got the confirmation i'm logged in but when i visit 'index.php' i still am considered as a guest. i'm lost any ideas ? i'dreally appreciate, thanks a lot ! Mike Last edited by nosta : November 29th, 2002 at 03:03 PM. |
|
#34
|
|||
|
|||
|
Mike,
This is due to your server and not the script this time. The reason why this is happening is because your sessions arnt working correctly? are you using IIS? Theres an option in the php.ini file to auto start session ids, you will need to turn this on, as its the only solution i know of to fix the problem |
|
#35
|
|||
|
|||
|
Thanks for replying.
I think i got a session id added to the url when i used the code in the article and not the one in the support file, not sure ... i'll have a look at it and let you know ... got this kinda links in my IE history : /index.php?PHPSESSID=5d11961bcab266a3e93d2e26489c2d c7 I got phpShop running and it processes sessions the same way right ? (guess) I'll be back later when I fixed it ![]() (not using IIS) Last edited by nosta : November 29th, 2002 at 09:11 PM. |
|
#36
|
|||
|
|||
|
Could anyone send me a working login.php page please ? Or post it
ah i need a break, getting nervous here ![]() |
|
#37
|
|||
|
|||
|
there is a problem
when i try to login it logs me in but when i go to index.php specified in article 2/6 , it still asks me to register maybe the server is not supporting sessions/cookies, so how do i go about doing it ?
__________________
Hungry for Code Programming works best with a team over one single person
Last edited by AmericanD : December 7th, 2002 at 04:19 PM. |
|
#38
|
|||
|
|||
|
even so that when i login , it says 'you have logged in' and when i refresh that same login.php page after logging in, it logs me out .. hmm
|
|
#39
|
|||
|
|||
|
one more question.
when we create users table, we say `users` and when we create sessions table, we just say sessions. why is that ? |
|
#40
|
|||
|
|||
|
ok my scripts started working now.. its just that table names weren't specified........ and it wasn't even mentioned in the article !!!
|
|
#41
|
|||
|
|||
|
hi all
thanks for the aouther of this article i've just finished coding a class with the same idea i so this class it's good but i think there is a problem in login.php in line ( about 106 or nearby ) you used mysql_fetch_row while you should use mysql_fetch_array that's why the session where recorded to the database with out the info of ( username , userid , auth , firstname , lastname ) thanks to you at all ![]() |
|
#42
|
|||
|
|||
|
AmericanD, wernt the field names the default names specified in the security function?? if there not please let me know, and im very sorry to all who got confused by this,
im only human, (i think) |
|
#43
|
|||
|
|||
|
OK OK OK, well ive finally opened a thread regarding the issues with my article, if you find a bug in my code (please make sure you havent made the mistake) please post the problem and where it is wrong in the article here: URL
Once i get a chance i will fix up the article, |
|
#44
|
|||
|
|||
|
Quote:
Lemme tell u what was wrong. In the first article 1/6 the code did not have proper table names in class security file. the select statements couldn't write into the session table anything BUT the sessionid. so thats the only problem but in your 2/6 article where you showed how to make tables, you had the other login page which was perfect since you had referenced the tables in it. i just copied and pasted but since you advised me to read the support material and do it, i learnt a lot.. so it was good for me .. no copying pasting in the future blindly |
|
#45
|
|||
|
|||
|
Ahh thankyou, ill make these changes once ive put up the next article.
|
|
#46
|
|||
|
|||
|
and the logout button
![]() |
|
#47
|
|||
|
|||
|
It seems many of the errors people are running into are types. I found one as well.
if($result) { // Write to the log file $strLog = "Login OK: {$result[1]}, {$result[3]}, {$result[4]}, {$_SERVER['REMOTE_ADDR']}, " . date("d/m/Y h:i:m A"); $dtlsSecurity->AddLog($strLog); if($dtlsSecurity->StoreSession($result[‘userId ‘], $result[‘username’], $result[‘level’], "{$result[‘firstname’]},{$result[‘lastname’]}")) { that code is unmodified. The problem resides here: if($dtlsSecurity->StoreSession($result[‘userId ‘], it should be if($dtlsSecurity->StoreSession($result[‘userId’], As you can see there was a space and the wrong single quote was placed there. Why not stick to basic quotes instead of curly quotes? Anyways that fixes one of serveral issues I had and I will post those later tonite since I gotta go out right now. Anyhow great article, this is just what I needed to add to my site =) Edit: oh yeah one more thing, I got confused when I got to what I believe was login.php page. The article never states what to call this page and I didn't know if it was to go on the registration.php page or on a new page...after some thinking i decided to call it login.php...hope I was right =) Edit 2: Why is the login page and registration pages NOT included in the support files? copying and pasting code just increases our change of errors. My editor supports regular quotes and curly quotes (using BBEdit) and that sometimes is messing up the code when I copy it. Not to mention you reiterate code to explain (which is great) but it's in the same colour yellow, thus confusing the readers that it needs to be included in the page. Last edited by mrl14 : December 19th, 2002 at 08:40 PM. |
|
#48
|
|||
|
|||
|
The Registration.php does not work. When I Press Join nothing happens, the same registration page comes on again. I tried to add this line to the registration page but no output. Anyway?
echo $_POST['what']; |
|
#49
|
|||
|