Some help needed

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
abie
Forum Newbie
Posts: 4
Joined: Fri Jun 26, 2009 4:13 am

Some help needed

Post 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?
Attilitus
Forum Commoner
Posts: 27
Joined: Wed Aug 08, 2007 2:32 pm

Re: Some help needed

Post 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)
User avatar
juma929
Forum Commoner
Posts: 72
Joined: Wed Jun 17, 2009 9:41 am

Re: Some help needed

Post 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.
abie
Forum Newbie
Posts: 4
Joined: Fri Jun 26, 2009 4:13 am

Re: Some help needed

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