2017-07-19 94 views
-3
<?php 
    include_once("includes/header.php"); 
    $SQL = "SELECT * FROM student ORDER BY st_id"; 
    $rs = mysql_query($SQL) or die(mysql_error()); 

?> 
<table width="90%" border="2" align="center"> 
    <tr> 
    <th colspan="5" align="right"><a href="student_add.php">Student Add </a></th> 
<th>ID. No. </th> 
<th>Name</th> 
<th>Father Name</th> 
<th>Mobile</th> 
<th>Action</th> 
</tr> 
<?php 
while($data= mysql_fetch_assoc($rs)) 
{ 
?> 
<tr> 
    <td>&nbsp;</td> 
    <td>&nbsp;</td> 
    <td>&nbsp;</td> 
    <td>&nbsp;</td> 
    <td>&nbsp;</td> 
</tr> 
    <? } ?> 

</table> 
<?php include_once("includes/footer.php"); ?> 

我得到一个错误:为什么我收到“解析错误:语法错误,意外的文件结尾......”

Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\php_marathon\student_view.php on line 30

什么错误?我无法理解。

+2

缺少'<?php'请改变''到'' RJParikh

+1

Exprator

回答

1

试试吧。

<table width="90%" border="2" align="center"> 
<tr> 
<th colspan="5" align="right"><a href="student_add.php">Student Add </a></th> 
<th>ID. No. </th> 
<th>Name</th> 
<th>Father Name</th> 
<th>Mobile</th> 
<th>Action</th> 
</tr> 
<?php 
while($data= mysql_fetch_assoc($rs)) 
{ 
?> 
<tr> 
    <td>&nbsp;</td> 
    <td>&nbsp;</td> 
    <td>&nbsp;</td> 
    <td>&nbsp;</td> 
    <td>&nbsp;</td> 
</tr> 
    <?php } ?> 

</table> 
+0

多亏了它的权利 –

相关问题