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. Quote 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. Quote 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 (edited) ...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. Edited May 1, 2013 by requinix Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.