Jump to content

help with session security


justinede

Recommended Posts

Hey All,

 

On my site, once a user logs in, this happens:

session_register("myusername");
session_register("mypassword");
header("location:users/$myusername");

 

thats just part of my checklogin.php. on their page at the top i have:

<?
session_start();
if(!session_is_registered(myusername)){
header("location:http://justinledelson.com");
}
?>

 

This makes sure no one who isnt logged in can see that page. BUT I want it so that no one but that certain user can see it. Right now, if you are loggged in, you can see everyone's pages. I know I probably have to change something in here

 

<?
session_start();
if(!session_is_registered(myusername)){
header("location:http://justinledelson.com");
}
?>

 

thanks for the help.

Link to comment
https://forums.phpfreaks.com/topic/163111-help-with-session-security/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.