Thanks for helping me on a woeekdn!
Here is the code i am trying to run. however i am getting:
Parse error: parse error, expecting ','' or';'' in c:\apache\htdocs\aol\adv_course.php on line 168
here is the code:
<?
// set a variable with the database name
$database_name = "test";
// attempt to connect ot database and store result in a variable
$dbh = mysql_connect("localhost","root","");
// check the result of the connection attempt
if (!mysql_select_db($database_name)) {
echo "Can't Select $database_name";
}
// execute a query and store the result
$res = mysql_query("select StartDate,EndDate,courseId,City,CourseType,TeacherId1,CoEmail,CoordinatorId,CoodPhone from coursetable where courseName = 'Advanced' ",$dbh);
// check to make sure the query actually ran
if (!$res) {
echo mysql_errno().": ". mysql_error ()."";
return 0;
}
if(mysql_num_rows($res) == 0)
echo("Nothing to Display!");
// use the query results
while ($thearray = mysql_fetch_array($res)) {
(line 168) -> echo "<tr valign="middle" class =courses1>";
echo "<td align="center"><FONT SIZE="1" FACE="Arial, Helvetica, sans-serif">$thearray['StartDate']- $thearray['EndDate']</font></td>";
echo "<td align="center"><FONT SIZE="1" FACE="Arial, Helvetica, sans-serif"><a href="http://localhost/AOL/login.php?id=$thearray['courseId']">$thearray'City'</a></font></td>";
echo "<td align="center"><FONT SIZE="1" FACE="Arial, Helvetica, sans-serif">$thearray['TeacherId1']</font></td>";
echo "<td align="center"><FONT SIZE="1" FACE="Arial, Helvetica, sans-serif"><a href="mailto:$thearray['CoEmail']">$thearray['CoordinatorId']</a><br>$thearray['CoodPhone']</font></td></tr>";
}
?>