Getting an unexpected T_STRING when trying to retrieve data and store as variable : <p>I am unable to make $firstname equal to $row['Firstname']. The same with Lastname too.</p>

<pre><code>$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'];
 }
</code></pre>
