We need to display values from db in a table using php
each row shd hv a column with a checkbox
we tried the following code
<?php
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("digital_lib") or die(mysql_error());
echo 'connected';
$query = "select * from employee where valid='0'";
$result =mysql_query($query) or die(mysql_error());
$num=mysql_numrows($result);
echo $num."<br/><br/>";
echo "<table border=1> \n";
echo " <th>";
echo " <td><b>employee id </b></td> \n ";
echo " <td><b>library id </b></td> \n ";
echo " <td><b>Employee name </b></td> \n ";
echo " <td><b>Division</b></td> \n ";
echo " <td><b>Designation</b></td> \n ";
echo " <td><b>Email id</b></td> \n ";
echo " </th> \n";
$i=0;
while ($i < $num) {
$eid=mysql_result($result,$i,"empid");
$lid=mysql_result($result,$i,"libid");
$empname=mysql_result($result,$i,"ename");
$div=mysql_result($result,$i,"division");
$desig=mysql_result($result,$i,"designation");
$email=mysql_result($result,$i,"emailid");
echo " <tr> \n";
echo "<td> <form name="acceptform" method="post"
action="acceptrequest2.php">";
echo "<input type="checkbox" name="selected"> </td>";
echo " <td> $eid </td> \n";
echo " <td> $lid </td> \n";
echo " <td> $empname </td> \n";
echo " <td> $div</td> \n";
echo " <td> $desig </td> \n";
echo " <td> $email</td> \n";
echo " </tr> \n";
$i++;
}
echo "</form>";
echo "</table> \n";
mysql_close();
?>
error in the highlighted line is
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in
d:\Inetpub\wwwroot\sakec\acceptrequest1.php on line 34
where r we going wrong?
[Non-text portions of this message have been removed]