I need help figuring this please.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
nick2
Forum Contributor
Posts: 118
Joined: Fri Jul 25, 2003 2:34 pm

I need help figuring this please.

Post 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
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post 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
User avatar
nick2
Forum Contributor
Posts: 118
Joined: Fri Jul 25, 2003 2:34 pm

Post 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 :(
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post 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...
User avatar
nick2
Forum Contributor
Posts: 118
Joined: Fri Jul 25, 2003 2:34 pm

Post 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:
Post Reply