Ghias uddin Ahmad
Dear Sir, 

              I have just wrote the code same like yours in lecture 10 but it did not 
              work for me. Kindly help me where is the problem. I am doing thrice  
              but there is same error in it.
Code is here:
<?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>

When I just checked it 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 </table>
Please help me..
Quote 0 0

Add a Website Forum to your website.

 
Urdu IT Accademy � 2013 | License Agreement