I have a problem which i don't understand...
I use the following code, but my server always gives me a failure
on the last line(+1) of my document. So he always gives the following error, but i can't see what i'm doing wrong.
Parse error: parse error in /home/student/1212548/php/exerc2/teachers.php on line 130
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Teachers:absences</title>
<link rel="STYLESHEET" href="stile.css" type="text/css" />
</head>
<body>
<div id="head">
<div id="navigation">
<a href="index.php">General</a> |
<a href="teachers.php">fill in absences</a> |
</div> <!-- navigation -->
<div id="thecombobox">
<div id="choice">
<form action="teachers.php" method="get">
<p>
<select name="teachername">
<option>
--teacher-- <!-- default value -->
</option>
<?php
$conn = mysql_connect("localhost", "*****", "*");
$query = "SELECT afknaam FROM db***.teachers ORDER BY afknaam";
$result = mysql_query($query);
while( $naam = mysql_fetch_assoc($result) )
{
?>
<option>
<?
print($naam['afknaam']);
?>
</option>
<?
}
mysql_close($conn); /close connection/
?>
</select> <!--doorgeven naam=teachername -->
<input type="submit" value="WHICH CLASSES?" /> <!--BUTTON= changed-->
</p>
</form> <!-- close action teachers.php method="get" -->
</div>
</div>
<?php
if (($teachername) && ($teachername != "--teacher--"))
{
print("<h2 id=\"teachername\">$lector</h2>");
print("<p>Choose the class in which you want to give absences</p>");
?>
<div id="thelist">
<table id="hourraster">
<tr class="odd">
<td class="toprow">Year</td>
<td class="toprow">Serie</td>
<td class="toprow">Day</td>
<td class="toprow">Begin</td>
<td class="toprow">End</td>
<td class="toprow">Lesson</td>
</tr>
<?php
$conn1 = mysql_connect("localhost", "****", "");
$query1 = "SELECT aj, r1, dg, b_uur, e_uur, vak FROM db***.hourraster WHERE teach1 = '$lector' OR teach2 = '$lector' OR teach3 = '$lector'ORDER BY dg, b_uur";
$resulting = mysql_query($query1);
$tel = 0;
while( $row= mysql_fetch_assoc($resulting) )
{
if ($tel%2 == 1)
{
print("<tr class=\"odd\">");
}
else
{
print ("<tr class=\"even\">");
}
$tel = $tel + 1;
?>
<td><? print($row['aj']); ?></td>
<td><? print($row['r1']); ?></td>
<td><? print($row['dg']); ?></td>
<td><? print($row['b_uur']); ?></td>
<td><? print($row['e_uur']); ?></td>
<td>
<?
print("<a href=\"afw2.php?lector=".$lector."&aj=".$row['aj']."&
r1=".$row['r1']."&dg=".$row['dg']."&b_uur=".$row['b_uur']."
&e_uur=".$row['e_uur']."&vak=".$row['vak']."\">".$row['vak']."</a>");
?>
</td>
<!-- </tr> -->
<?
} /end of while-lus resulting/
mysql_close($conn);
?>
</table>
</div>
</div>
</body>
</html>
thanx in advance