Ok, I know how to set up a query to display only data from a table that matches a certain word or what-not, but how (if possible) do I set up the php code so that a user can log in via his personal account, and display only data from a table which has his/her name in the row of data? I tried several searches on the forum, but couldn't find what I needed to know....maybe my lack of knowledge limits me from searching for the proper terms, I don't know....so any help would be greatly appreciated!
Situation: User information is stored in a table "reflist" with fields:
id | f_name | l_name | address_1 | address_2 | city | state | zip | prim_phone | alt_phone | email | username | password
An assignor plugs in the names of officials to a schedule of games, meaning that the persons name could show up in 1 of 3 columns in the table "schedule".
Table name "schedule" has fields:
id | date | time | location | home | visitor | league | referee | ar1 | ar2
The individuals name could appear in either the referee, ar1, or ar2 fields.
When assigned to a game, the referee's ID# is stored in one of the 3 columns above, not the name.
I need to set it up so that the user can log in, and click a link like "View Games" and it will display all of the data for any game to which their name (ID#) is assigned. I cannot allow the user to select their name from a list, they cannot be allowed to see ANY information for a game where they are not assigned, so it needs to limit them automatically based on their login information when they enter a username and password.
Thoughts? Thanks for any help...very much appreciate it! Please note that I'm very new to php, I'm trying my best to learn, but I don't know things that well yet, so the more detail/walkthrough you can offer the better!
Landis