gpt4 book ai didi

php - 错误 : ( ! ) 解析错误 : syntax error, 意外 '' (T_ENCAPSED_AND_WHITESPACE),需要标识符 (T_STRING)

转载 作者:行者123 更新时间:2023-11-29 06:17:00 27 4
gpt4 key购买 nike

早上好

我今天早上遇到这个搜索脚本的一些问题,我一直收到这个错误

! ) Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\wamp\www\schoolmanagementsystem\search.php on line 24

我的源代码是这样的

<html>
<title>Search Records</title>
<head>
<body>
<form name="" id="" method="post" action="search.php"/>
<p> Enter Student name : <input type="text" name="fullname" id="fullname"/>
<input type="submit" name="senda" value="Search Data" />

</form>

<?php
if(isset($_POST['senda'])){

include 'mysqlconn.php';
$con = mysqli_connect($host, $dbuser, $pass, $db) or die('Cannot Connect');

$name = $_POST['fullname'];

$sql = "SELECT * FROM scores WHERE fullname = '$name'";
$result = mysqli_query($con,$sql) or die("Error: ".mysqli_error($con));

while($row = mysqli_fetch_array($result,MYSQLI_ASSOC))
{
echo"$row['Fullname'] .' '. $row['studentNo'] .' '. $row['SubjectName'] .' '. $row['GPA'] .' '. $row['CGPA'] .' '. $row['SCORE']<br/>"; // Error here
}
mysqli_free_result($result);
//$result->close();
}

?>
</body>
</head>
</html>

严重需要帮助

最佳答案

echo $row['Fullname']."  ".$row['studentNo']."  ".$row['SubjectName']."  ".$row['GPA']."  ".$row['CGPA']."  ".$row['SCORE']."<br/>";  // Error here

关于php - 错误 : ( ! ) 解析错误 : syntax error, 意外 '' (T_ENCAPSED_AND_WHITESPACE),需要标识符 (T_STRING),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35310991/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com