I need to restrict access to other table id's by making a check against an (id) of a table named users and then check that the (user_id) of another table is the same i.e
table1
id username password
table2
id somedata user_id
if table1 id is the same as table2 user_id then show table2 contents but only show the contents of table2 where the user_id exists and still use the id row of table2 to display contents in a url like ?id=12 only if its the users data if not frow an error
How would I go about this I have tried and tried but no joy
I have some code setup that I been trying I can post if like.