.> $profile_id = (!empty($_GET['id'])) ? $_GET['id'] : false; if($profile_id){ $connection = mysqli_connect($dbHost, $dbUser, $dbPass, $dbName); $profile_id = mysqli_real_escape_string($connection, $profile_id); $data = mysqli_query($connection, "SELECT * FROM users WHERE id='$profile_id'"); if($data){ $row = mysqli_fetch_array($data, MYSQLI_NUM); $profile_First_Name = $row[3]; $profile_Last_Name = $row[4]; $profile_birthdate = $row[5]; $profile_country = $row[6]; $profile_state = $row[7]; $profile_town = $row[8]; $profile_signup = $row[9]; $profile_bio = $row[10]; $profile_image_ext = $row[11]; $profile_isOnline = $row[13]; }else{ echo "The data didn't go through"; } if(mysqli_num_rows($data) > 0){ } else{ header("Location: index.php"); } }else{ header("Location: dashboard.php"); } ?> SocialTune | <?php echo 'profile'; ?>

'; ?> y; if($profile_isOnline == 1){echo 'Online';}else{echo 'Offline';} echo ' '.$profile_First_Name.' '.$profile_Last_Name.'
'; echo 'Age: '.$profile_age.'
'; echo 'Town: '; if($profile_town == false){echo '[unlisted]
';}else{echo $profile_town.'
';} echo 'State: '; if($profile_state == false){echo '[unlisted]
'; }else{echo $profile_state.'
'; } echo 'Country: '; if($profile_country == false){echo '[unlisted]
'; }else{echo $profile_country.'
'; } ?> bio:
'; echo '

'.$profile_bio.'

'; ?>

Garbled Transmission:

'; echo ''.$status_owner_name.' '.$status_date.''; echo ''.$status_body.''; } ?>

Friends List'; ?>

0){ // Checks if they have friends. while($row = mysqli_fetch_array($get_friends, MYSQLI_NUM)){ $friend_A = $row[1]; $friend_B = $row[2]; if($friend_A == $profile_id){ // use friend_B. $friend_search = "SELECT * FROM users WHERE id='$friend_B'"; $get_friend_info = mysqli_query($connection, $friend_search); while($friend_info = mysqli_fetch_array($get_friend_info)){ $friend_info_id = $friend_info[0]; $friend_info_name = $friend_info[3].' '.$friend_info[4]; $friend_info_img = $friend_info[11]; $friend_info_online = $friend_info[13]; } }else{ // use friend_A. $friend_search = "SELECT * FROM users WHERE id='$friend_A'"; $get_friend_info = mysqli_query($connection, $friend_search); while($friend_info = mysqli_fetch_array($get_friend_info)){ $friend_info_id = $friend_info[0]; $friend_info_name = $friend_info[3].' '.$friend_info[4]; $friend_info_img = $friend_info[11]; $friend_info_online = $friend_info[13]; } } if($counter == 0 || $counter == 3){ echo '
';} echo''; }else{ echo'Offline'; } echo ''; if($counter == 2 || $counter == 5){ echo '
'; if($friend_info_online == 1){ echo 'Online
'.$friend_info_name.'
'; } $counter = $counter + 1; } }else{ // no friends lol... } ?>
 
0){ // Checks if they have friends. if($profile_id == $user_id){ // nothing. }else{ //$isFriend = "SELECT * FROM friends WHERE user_two='$profile_id' AND pending='$isPending' OR user_one='$profile_id' AND pending='$isPending'"; if($friend_A == $user_id || $friend_B == $user_id){ echo '
'; }else{ echo '
'; } } }else{ echo '
'; } ?>