DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   securing user page links (http://www.daniweb.com/forums/thread168918.html)

rohitrohitrohit Jan 17th, 2009 4:01 am
securing user page links
 
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......

buddylee17 Jan 17th, 2009 5:03 pm
Re: securing user page links
 
Look into using sessions for authentication. Basically the idea is:
<?php
session_start();
if($_SESSION['loggedIn']==true){
echo "This content will only be viewable for users who are logged in";
}
else{
echo "You are not logged in";
}?>


All times are GMT -4. The time now is 9:58 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC