Home › Forums › Back End › Nice Profile URL? › Re: Nice Profile URL?
February 2, 2012 at 2:44 pm
#96042
Member
OK well if you have a session you don’t need to be passing the id or username to the profile page as they are already stored in the session
You can have mod rewrite turn profile/username into profile.php and then at the top of profile.php you can run
$result = mysql_query(‘SELECT * from users WHERE username = “‘.$_SESSION.'”‘);
$userinfo = mysql_fetch_array($result);
to fill $userinfo with all your users details for use on your profile page. You don’t need to pass ?id= or ?username= to profile .php to achieve this, that’s what the session variables are for.