943,722 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 410
  • PHP RSS
Jan 17th, 2009
0

securing user page links

Expand Post »
hi all

new to php .....
how to protecte links on userpage when he login successfully.
i want that out side user who not logged in ,can not see page after copy those links in browser.any example.

thanx in advan......
Reputation Points: 15
Solved Threads: 5
Junior Poster
rohitrohitrohit is offline Offline
120 posts
since Oct 2007
Jan 17th, 2009
0

Re: securing user page links

Look into using sessions for authentication. Basically the idea is:
php Syntax (Toggle Plain Text)
  1. <?php
  2. session_start();
  3. if($_SESSION['loggedIn']==true){
  4. echo "This content will only be viewable for users who are logged in";
  5. }
  6. else{
  7. echo "You are not logged in";
  8. }?>
Reputation Points: 232
Solved Threads: 137
Practically a Master Poster
buddylee17 is offline Offline
665 posts
since Nov 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: PHP/Ajax search facility
Next Thread in PHP Forum Timeline: Problem with dynamic paths





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC