Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Select the specific user data from the database

3 views
Skip to first unread message

nagendra prasad

unread,
Sep 5, 2010, 7:21:52 AM9/5/10
to PHP DB, php-w...@lists.php.net, phpex...@yahoogroups.com, php mysql
Hi Experts,

I have a mysql database. What I want is that when a user login he can able
to see his entries only, so that he can delete, add or edit his entries
only. I have 2 different tables one for user details and another for actual
entries. Please help me.

Best,
Guru.

nagendra prasad

unread,
Sep 5, 2010, 9:19:34 AM9/5/10
to Phpster, PHP DB, php-w...@lists.php.net, phpex...@yahoogroups.com, php mysql
PS: Want to check the username from a table and the password from another
table.

Is it possible ??

Phpster

unread,
Sep 5, 2010, 9:43:19 AM9/5/10
to nagendra prasad, PHP DB, php-w...@lists.php.net, phpex...@yahoogroups.com, php mysql
I would suggest that you keep authorization separate from data access

Bastien

Sent from my iPod

Phpster

unread,
Sep 5, 2010, 9:03:55 AM9/5/10
to nagendra prasad, PHP DB, php-w...@lists.php.net, phpex...@yahoogroups.com, php mysql
Then each record needs to have a user filed where their is stored. Then your access query just adds an additional filter to check this value

Select * from data_table where user = $user

Bastien

Sent from my iPod

0 new messages