-2

I am unable to make $firstname equal to $row['Firstname']. The same with Lastname too.

$locationsQuery='select Firstname, Lastname, from locations where
username=$username;
 $results = sqlsrv_query( $conn, $locationsQuery, array($desiredusername));
 while($row = sqlsrv_fetch_array($results))
 {
 $firstname = $row['Firstname'];
 $lastname = $row['Lastname'];
 }
Z.Sow
  • 1
  • 1

1 Answers1

-1

You are missing a ' at the end of the first line containing $locationsQuery, in front of ;

faffaffaff
  • 3,429
  • 16
  • 27