arsenalbates
12-28-2010, 10:57 AM
Hi, i want to create a page that when the user logs in redirects them to a folder named the same as the user field in the login.
my main problem is directing the user to their own folder for their own login. each member will have a different folder and each i want to be redirected to that folder after logging in.
so far i have created a variable that look like this
$filename = $_SESSION['username'];
this makes the $filename variable the same as the user name that the user logged in with. so far so good. although then i created a PHP redirect that looks like this ...
header( 'Location: /$filename' ) ;
this doesn't work and im not sure why ??? instead it takes me to my url and then /$filename. its looking at the variable as a part of the URL and not what the variable contains.
Any help would be greatly appreciated
Many Thanks
Sam
my main problem is directing the user to their own folder for their own login. each member will have a different folder and each i want to be redirected to that folder after logging in.
so far i have created a variable that look like this
$filename = $_SESSION['username'];
this makes the $filename variable the same as the user name that the user logged in with. so far so good. although then i created a PHP redirect that looks like this ...
header( 'Location: /$filename' ) ;
this doesn't work and im not sure why ??? instead it takes me to my url and then /$filename. its looking at the variable as a part of the URL and not what the variable contains.
Any help would be greatly appreciated
Many Thanks
Sam