Welcome ".$_SESSION['first']."
"; $id = $_SESSION['id']; //query database $sql = "SELECT * FROM user WHERE id='$id'"; $result = mysqli_query($conn, $sql); if(mysqli_num_rows($result) > 0) { while($row = mysqli_fetch_assoc($result)) { $sql = "SELECT * FROM profileimg WHERE userid='$id'"; $result = mysqli_query($conn, $sql); while($row = mysqli_fetch_assoc($result)) { $status = $row['status']; echo "