Skip to content

Commit

Permalink
Update profile/profile-1.php
Browse files Browse the repository at this point in the history
  • Loading branch information
erhowell committed Nov 17, 2018
1 parent 27e698a commit 6623490
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions profile/profile-1.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,20 @@
die("Connection failed: " . $conn->connect_error);
}

$sql = "SELECT p.user_id, p.location, p.school, p.bio, u.fName, u.lName
FROM professional p
JOIN user u ON p.user_id=u.id
WHERE p.user_id =$user_id
";
$sql = "SELECT fName, lName
FROM user
WHERE id =$user_id";

if ($result=mysqli_query($conn,$sql))
{
// Fetch one and one row
while ($row=mysqli_fetch_row($result))
{
$location = $row[1];
$school = $row[2];
$bio = $row[3];
$name = $row[4]. " ". $row[5];

$name = $row[0]. " ". $row[1];

}

// Free result set
mysqli_free_result($result);
}
Expand Down

0 comments on commit 6623490

Please sign in to comment.