Click here to Skip to main content
15,889,096 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
i am a making a web site which some user registered and do some thing that is only access for account holder but at this with out login if user change the url and access the after login page like (i am makin afterlogin.php)if user right in url he access it but this page access only when user login properly (simply say that with out account user access my page easily) i want stop this thing
Posted

use session and assin it when log in successfully and check at each page if session empty the redirect to login page.
 
Share this answer
 
Comments
JustWorking 9-Jun-11 9:59am    
PS: If you find the answer helpfull please Click Accept Solution and vote 5 :)
pucit009 9-Jun-11 12:42pm    
require a some peace of code
JustWorking 10-Jun-11 4:16am    
check solution 2
Check this site on how to use PHP session:

[Click Here]
 
Share this answer
 
Comments
pucit009 10-Jun-11 9:10am    
this link is not proper working

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900