<?php
$con=mysql_connect("localhost","root","") or die("Error");
mysql_select_db("college") or die("DB error");
$q=mysql_query("select* from studentinfo");
echo "<table border=1>
<th> Roll No</th>
<th> Name</th>
<th> Class</th>
<th> Update</th>";
while($rows=mysql_fetch_array($q))
{?>
<tr>
<td><? echo $rows[0];?></td>
<td><? echo $rows[1];?></td>
<td><? echo $rows[2];?></td>
</tr>
<? } ?>
</table>
Dear Experts
Kindly check this code and please help to find errors in it. I have just wrote that code it shows errors.
Code is here:
When I just checked it at that place it did not work
Error: Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\2017 work php\updt.php on line 22
at 22 line there is at the end