lozzaSoton Posted May 1, 2013 Share Posted May 1, 2013 Hey, I know this is really basic problem but i would really appreciate some help. I am receiving this error: Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' on line 16 of the following code: <?php require_once 'connect.php'; if ($_POST ['criterion'] == 'c'){ $status = 'current'; } else{ $status ='left'; } $listings = mysqli_query($connect, "SELECT * FROM student WHERE status ='".$status."'"); while ($row = mysqli_fetch_query($listings)) { echo 'Name:' $row['name'] . " " .' Date of Birth:' $row['dateOfBirth'] . " " . 'Gender:' $row['gender'] . " " .'Email:' $row['email']. " ".; } echo '<br />'; } ?> Any help would be greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/277521-parse-error-syntax-error-unexpected-t_variable/ Share on other sites More sharing options...
trq Posted May 1, 2013 Share Posted May 1, 2013 You have an extra . on the end. Link to comment https://forums.phpfreaks.com/topic/277521-parse-error-syntax-error-unexpected-t_variable/#findComment-1427661 Share on other sites More sharing options...
requinix Posted May 1, 2013 Share Posted May 1, 2013 ...and are missing a few of them (on the same line). Gotta have them between strings and variables just like you do between strings and strings. Link to comment https://forums.phpfreaks.com/topic/277521-parse-error-syntax-error-unexpected-t_variable/#findComment-1427669 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.