Page 1 of 1

I need help figuring this please.

Posted: Thu Jul 31, 2003 9:25 am
by nick2
Alright since i'm pretty new at php I have no idea really how to do what I need / want. :(


I got this done:

Register: - adds the info to mysql database.
ID
password
name
location
email
signature

Login:
Checks database if ID and password are a match.

Now how do I make it so it knows i'm logged in and it will bring "me" to my home page based on the ID like to your messages and profile to edit etc. <- can't figure this one out.

Thanks for your help,
Nick :oops:

I was gonna post in database section but it doesn't relate to that because i'm not sure if the answer will be database related. :P

Posted: Thu Jul 31, 2003 9:52 am
by m3rajk
i suggest a table that has two columns.

id
lastlogin (timestamp)

and then time ppl out when timestamp isn't updated recently enough

and change login so that it sends a redirect header with the success page

Posted: Thu Jul 31, 2003 10:54 am
by nick2
success page , yes. but how does it know what msg box to look in.. like could i do something like:

http://www.slices.net/system/index.php?User=Nick

i dunno :(

Posted: Thu Jul 31, 2003 11:03 am
by m3rajk
exactly. you need to pass the userid somehow.

either get or cookie since you can't do post.

or you could use sessions which will use one of those...

Posted: Thu Jul 31, 2003 11:07 am
by nick2
so basicly you're telling me to use cookies? :P

also, how would I make that link i posted up there before work..

explain please I am a noob ^__^ :roll: