解析错误:语法错误,第46行的C:\ xampp \\\ htdocs \ xampp \\\2014 \ select.php中的意外$ end [英] Parse error: syntax error, unexpected $end in C:\xampp\htdocs\xampp\2014\select.php on line 46

查看:77
本文介绍了解析错误:语法错误,第46行的C:\ xampp \\\ htdocs \ xampp \\\2014 \ select.php中的意外$ end的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<table width="500" align="center" border="0" cellspacing="0">
<tr> 
	<td> List of Student </td>
</tr> 
	<tr bgcolor="#FF0033">
    	<td>Name </td>
        <td>Father Name </td>
        <td>Gender </td>
        <td>Qualification </td>
    </tr>
    	$SERVERNAME='localhost';
	$USERNAME= 'ROOT';
	$PASSWAROD= '';
	$DBNAME='test';
		$conn = new mysqli($SERVERNAME,$USERNAME,$PASSWAROD,$DBNAME);
	if ($conn -> connect_error)
	echo "connection error";
	$sql = "SELECT * FROM  studentinfo";
	$result= $conn -> query($sql);
	if ($result -> num_rows > 0)
	 {
	 	while ($row = $result -> fetch_assoc())
			{
				$name = $row['name'];
			
	?>
    <tr>
    	<td> </td>
	
	</tr>
    	}	
     }
</table>
</body>
</html>

推荐答案

SERVERNAME ='localhost ;
SERVERNAME='localhost';


USERNAME ='ROOT';
USERNAME= 'ROOT';


PASSWAROD ='';
PASSWAROD= '';


这篇关于解析错误:语法错误,第46行的C:\ xampp \\\ htdocs \ xampp \\\2014 \ select.php中的意外$ end的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆