Forum Moderators: coopster
I am having an issue of figuring out how to restrict a search page that is based on php using mysql queries revealing the results to the client/user based on the jobs/projects being handled by the company.
The client/user is a member of the client/company, as the contact or representative. With that, the connection in the access to content is based from the association of the username_id of the user and the company_id of the company that he represents being how he gets to see the information of the project status generated by the database.
Can anyone help me with a quick code resolution for associating this?
At present, I have two tables for this.
Table 1 is the production information table.
Table 2 is the user/login table.
The joining information is the Company_ID that is represented on both.
I want to have the data from the database that the user is able to access and read to be restricted to the company_id associated via the query and query results.
How would I be able to go about doing this? I know it is as simple. I'm just not seeing it.
I'm using php/mysql and with the mysql flexability to add as many column values to a single table, I am wanting to take advantage of the and filter the viewing with this method for those that won't have access to EVERYTHING on a given row.
Should work as a simple query selecting set values, right?
There's some good reading in this forum's library - this thread has links to other threads:
Basics of extracting data from MySQL using PHP [webmasterworld.com]
one more if you don't mind. Any good coding options for updating from a php form to mysql database to replace/update existing row values?
I have a massive form for a client and the form works incredibly well. I just don't know a good way of allowing them to update it via an "update" button next to the submit and have it work properly.
any suggestions here would be highly appreciated.
Thanks again for your help.