This is a discussion on "php sessions" within the PHP Forum section. This forum, and the thread "php sessions are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
php sessions
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
php sessions
well, i've been working on an small tutorial site (don't mind the mess)
and here's my problem: login as admin with the password 123456 nothings wrong right? now wait till the index page comes back up, and see who's welcomed. the same thing happens when you login as "test" with the password "5312" --- it alway's changes the session variable "user" to thomask... i tried fixing it by turning on register_globals in the .htacces file, but all editing .htacces files give me are internal server errors... now, anybody know an way to fix this? |
|
|
|
#2
|
|||
|
|||
|
Re: php sessions
Need to see some code, but i'm going to guess some where along the way your username is being reset.
|
|
#3
|
|||
|
|||
|
Re: php sessions
don't mind the mess in the code
quickly puffed it together. -- for asfar as i searched, it's not beeing changed anywhere.. -> forgot the database :s exported it in 2 different compatebillities. Last edited by fragalot; Nov 4th, 2005 at 10:35. |
|
#4
|
|||
|
|||
|
Re: php sessions
To test if its being reset change the $_SESSION['user'] to something else like $_SESSION['name'] that way if user is being used some where else it will solve the problem if it still is getting changed you know the problem is some where else.
|
|
#5
|
|||
|
|||
|
Re: php sessions
i'm re-doing the whole site now, because it's coded poorly, and cluttered
thx for the help tho. |
|
#6
|
||||
|
||||
|
Re: php sessions
Yep, just rename the session you're using to something unique, the session ['user'] is being used on your server/domain already.
|
|
#7
|
|||
|
|||
|
Re: php sessions
even when i used session_name('frag'); it didn't help, lol
|
|
#8
|
||||
|
||||
|
Re: php sessions
Hmm, strange. But it has something to do with sessions, as your script works fine on my server, I see the name 'admin'.
Have you got some other sort of login system that you're using? If so, try destroying those sessions (logging out) and logging in with your tutorial site. |
![]() |
| Tags |
| php, sessions |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Little help on sessions? | ktsirig | PHP Forum | 0 | Mar 2nd, 2006 22:12 |
| Sessions | djme | PHP Forum | 4 | Feb 25th, 2006 12:10 |
| xsl, php sessions (please help) | marco_van_mayo | Other Programming Languages | 0 | Feb 19th, 2006 14:35 |
| PHP Sessions | benbacardi | PHP Forum | 5 | Aug 28th, 2005 09:29 |
| Sessions | vor | ASP.NET Forum | 3 | Aug 19th, 2003 20:10 |