Solved

restrict non logged in users for viewing particular mysql columns

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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 …

776 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