Greetings:
I have a php page called "lookup_user.php" that prints a bunch of
information about a given user, based on data in my database. I use a variable "UID" to index the users in my database.
I have a php page called "list_users.php" that lists all users by name and then provides a link to to lookup_user.php and it passes the UID as part of the url. This is sort of what the list_users.php page looks like:
foreach ($array_of_uids as $uid) {
echo "<p><a href=\"http://localhost/lookup_user.php?uid=$uid\">User $uid</a>";
}
So I will end up with a page of links that looks like this:
<p><a href="http://localhost/lookup_user.php?uid=1">User 1</a>
<p><a href="http://localhost/lookup_user.php?uid=2">User 2</a>
<p><a href="http://localhost/lookup_user.php?uid=3">User 3</a>
Anyway, I don't really like passing the uid variable to the
lookup_user.php page as part of the url. Is there a better way, either with sessions or with something I'm currently unaware of? Or is this the right way to go about it?
I'm sure there's plenty of other problems with the code. All comments are welcome.