if(isset($_GET['id'])){ $userID = Input::get('id'); $userQ = $db->query("SELECT * FROM profiles LEFT JOIN users ON user_id = users.id WHERE user_id = ?",array($userID)); $thatUser = $userQ->first(); if($thatUser!=null){ if($thisUserID == $userID){ $editbio = ' Edit Bio'; }else{ $editbio = ''; } $ususername = ucfirst($thatUser->username)."'s Profile"; $grav = get_gravatar(strtolower(trim($thatUser->email))); $useravatar = ''.$ususername.''; $usbio = html_entity_decode($thatUser->bio); }else{ $ususername = "404's Profile"; $usbio = 'User not found'; $useravatar = ''; $editbio = ' Go to the homepage'; } }else{ $ususername = "404's Profile"; $usbio = 'User not found'; $useravatar = ''; $editbio = ' Go to the homepage'; }