Solved

restrict non logged in users for viewing particular mysql columns

Posted on 2011-09-15
3
255 Views
Last Modified: 2012-05-12
Hi,
has anybody tried ..or got a solution in order to restrict a non logged in user from viewing a particular db column which happens to be a link to a file.

i.e. non logged in users can view the rest of the table columns output, but not the one which has a link to a file.
The users are going through a php interface.

I've got the usual in place, session, login in/out etc.
thanks
0
Comment
Question by:encodeme
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 125 total points
ID: 36545201
There is no generic solution to that, you have to implement it on each page that you have that display.  Something like:

if($loggedin) echo $row['restricted'];
0
 

Author Closing Comment

by:encodeme
ID: 36545513
I'll have a play around with that.
Thanks for the direction.
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 36546394
You're welcome.
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now