Hello, i havn'nt used php for a while because i gave up. But now im back to give it another try...So i fail straight away and need a solution to this.
I have been following the profile tutorial and have a profile on uid 1. But i don't know to be able to make that when i click on profile, it will take me to Profiles/profile.php?uid=""
$SESSION['uid'']???
$_SESSION['uid'] will always be the ID of the currently logged in user, so using that in your url will be the equivalent of a "My Profile" link. I.E it will always take you to your own profile.
There are a multitude of ways to get an id into the url, but I'm gonna need more info on what you're trying to do exactly to be able to help with that
Basically, on the main page, it says the users name, they click it. It's a drop down, and it says "Profile", and so when they click it, it takes them to their profile. Simple.
Well, when you log a user in, you set some values in $_SESSION, do you not?
You need to grab the users ID from your Database and insert it into $_SESSION['uid'], otherwise you have no value in $_SESSION['uid'], and trying to grab a value from a variable with no value isn't the easiest thing to do.