you guys here in the forums are gods thank you.
this works but like i butt head i could get it to work till i remembered the ;
duh, oh well noob mistake
$u = $_GET['u'];
ended up leaving the code like this
<?php
// Connect to the database
require("config.php");
// select database
// Get users information
$u = $HTTP_GET_VARS['u'];
$result = mysql_query("SELECT * FROM `users` WHERE `userid` = $u LIMIT 1");
if (!$result) {
echo("<P>Error performing query: " .
mysql_error() . "</P>");
exit();
}
while($r=mysql_fetch_array($result)){
// Turn breaks into new lines for biography field
$r[biography] = nl2br($r[biography]);
// Output users information
echo "<b>Viewing $r[username]'s profile</b><br>";
echo "Biography: $r[biography]";
}
?>
thanks again for the help you guys rock.
and i will be sure to read more on _GET