Jump to content

[SOLVED] Displaying Profiles


TGWSE_GY

Recommended Posts

Something like so:

 

http://mysite.com/profile.php?uid=38

 

if(isset($_GET['uid'])){
    $uid = mysql_real_escape_string($_GET['uid']);
}elseif(isset($_SESSION['id'])){
    $uid = mysql_real_escape_string($_SESSION['id']);
}else{
    header("Location: /");
    exit;
}
$sql = mysql_query("SELECT * FROM users WHERE id = '$uid'");
$row = mysql_fetch_array($sql);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.