|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Logging into ChiefDelphi.com question
Does anyone know how the message board keeps the username logged in after registering, so that the user doesn't have to log in again? I'm asking this because for my PHP script I'm working on, I want the user to not have re-login everytime, or atleast after s/he gets done registering.
|
|
#2
|
|||||
|
|||||
|
Re: Logging into ChiefDelphi.com question
Cookies?
|
|
#3
|
||||
|
||||
|
Re: Logging into ChiefDelphi.com question
Quote:
) |
|
#4
|
|||||
|
|||||
|
Re: Logging into ChiefDelphi.com question
I believe it is cookies because whenever I clear my cookies, I have to log in again. (/me defers to Brandon for the final answer)
However with other sites, like amazon.com they track you through the web address itself. But this only works for one session at a time. |
|
#5
|
|||||
|
|||||
|
Re: Logging into ChiefDelphi.com question
Thank you all very much. I had a feeling it was through cookies (my other theory was very terrible). Off to learn about PHP and cookies.
|
|
#6
|
|||||
|
|||||
|
Re: Logging into ChiefDelphi.com question
If what you're doing is trying to do a log-in system, don't depend on the cookie information to be sent from you. People can write their own cookies. Say there were two users.. billybob and jimmyjoe. If billybob signs in, and you set a cookie to 'user=billybob,' jimmyjoe could come along and write his own cookie that says 'user=billybob' allowing him to bypass any password. A common plan is to assign a user-id string when the person logs in. Store it in a database along with the rest of the users information and in his cookie. Then when he accesses the page again, check the database for that unique id. It's not super-ultra-mega secure. But it's exponentially better than using the login name as the method to check. Hope that helps, or even relates to what you're trying to do
(Maybe it'll help some other random soul.. *shrug*) |
|
#7
|
|||||
|
|||||
|
Re: Logging into ChiefDelphi.com question
Quote:
|
|
#8
|
|||
|
|||
|
Re: Logging into ChiefDelphi.com question
Use the following code at the top of each page:
PHP Code:
|
|
#9
|
|||||
|
|||||
|
Re: Logging into ChiefDelphi.com question
There are a few cookies that keep you logged in. You could, rather than use cookies, send the session ID through the URL. That is what vBulletin does if you don't allow cookies to be used, and have that setting configured in your options.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Question of the Week [05-02-04]: The Very Merry Month of May | EddieMcD | Rumor Mill | 10 | 05-05-2004 14:02 |
| MIM's question of the day on programming. | Gene F | Programming | 3 | 24-02-2004 16:32 |
| A question about control system options | computhief263 | Control System | 7 | 04-02-2004 14:46 |
| Question About ChiefDelphi.com | Aignam | CD Forum Support | 1 | 13-10-2002 18:28 |