CODE
<?php include('base.php');
$_GET['UserID'];
$result = mysql_query("SELECT * FROM users WHERE UserID = 1");
while($row = mysql_fetch_array($result))
{
echo $row['FirstName'] . " " . $row['LastName'];
echo "<br />";
}
?>
$_GET['UserID'];
$result = mysql_query("SELECT * FROM users WHERE UserID = 1");
while($row = mysql_fetch_array($result))
{
echo $row['FirstName'] . " " . $row['LastName'];
echo "<br />";
}
?>
The $_GET['UserID']; I am not sure serves any purpose yet.
WHERE UserID = 1 ... I think "1" needs to be replaced with something. This will show only UserID 1, I want to be able to visit any profile.php page, e.g. profile.php?UserID=4 and for UserID=4 to show that specific user's information.
Also, I would like to be able to create a link automatically on a user's account page, such as...
Your profile is located at... academic-self-help.zymichost.com/profile.php?UserID=4 for example...
Please help with these two tasks, thanks!
This is just testing and getting it to work, of course they'll be more information than just first and last name.
Which brings me to another task, is it possible for me to allow them to show or hide last name? I would imagine so, I remember using a code that allows you to show or hide email - guess it would work that same way.
