Solved

restrict non logged in users for viewing particular mysql columns

Posted on 2011-09-15
3
264 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 83

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 83

Expert Comment

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

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

937 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

10 Experts available now in Live!

Get 1:1 Help Now