Page 1 of 1

Some help needed

Posted: Fri Jun 26, 2009 4:17 am
by abie
I'm somewhat of a n00b so hopefully this is simple for someone out there.

I have a database with 2 tables. 1 holds the user login and password, the other holds information about scores, including which user submitted it.

I have a login system up and running but have run into a stumbling block. What I want to do is this,

User logs in. Gets taken to a member area page. I want them to be able to submit their score without having to type in their username each time they do so. in the scores table, i want the username to be inclouded as well.

I have a feeling this is easy, but I'm tired...can anyone point me in the right direction?

Re: Some help needed

Posted: Fri Jun 26, 2009 8:00 am
by Attilitus
If you have a login system, you should be able to access the current userid or username of the user executing the script. If you can't, then what good is your authentication system? (If this isn't easy to access, then you should rewrite your authentication code)

Re: Some help needed

Posted: Fri Jun 26, 2009 8:50 am
by juma929
Hello,

A lot of authentication routines use SESSIONS to manage the user details to perform actions based on their credentials. If you are just requiring the username to be submitted with the score, you should be able to pull this information from the SESSION.

If not, let me know and ill build you a new authentication system + score system if I get the time this weekend.

Thanks.

Re: Some help needed

Posted: Sat Jun 27, 2009 4:16 pm
by abie
The problem is with pulling the information. Like I said...still a noob :)

I know sessions is something I need to learn. And I'm sure that is where I need to go. Anyone point me to some good tutorials?