开发者

PHP & MySQL: unexpected T_VARIABLE [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 9 years ago.

Getting unexpected T_VARIABLE on 18 which is - while ($row = mysql_fetch_assoc($fetchCourses)) {

<?php include("config.php"); ?>

<html>
<head>
    <!-- Style Sheets -->
    <link rel="stylesheet" href="stylesheets/reset.css" type="text/css" media=screen />
    <link rel="stylesheet" href="stylesheets/style.css" type="text/css" media=screen />
</head>
<body>

<?php 

$fe开发者_高级运维tchCourses = mysql_query("SELECT * FROM CourseMembers
                            LEFT JOIN Courses ON Courses.CourseID = CourseMembers.CourseID
                            WHERE CourseMembers.UserID = 1
                            ORDER BY Courses.CourseName ASC")

while ($row = mysql_fetch_assoc($fetchCourses)) {
    echo $row['CourseName'];
} ?>

Any Ideas?


Missing ';' in the previous line.


Yeah, missing the semi colon on the line with the mysql_query.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜