gpt4 book ai didi

php - 解析错误 : syntax error, 意外 ';'

转载 作者:行者123 更新时间:2023-11-29 21:32:45 25 4
gpt4 key购买 nike

我有一个错误 解析错误:语法错误,意外的“;” 12号线乍一看一切正常。有什么想法吗?

<?php
require_once('include/session.inc.php');
require_once('include/dbcon.php');

if (!isset($_SESSION['user_id'])) {

header ('Location: /index.php');
}
echo $_SESSION['user_id'];


$query = mysqli_query ($mysqli, "SELECT * FROM wants WHERE user_id='$_SESSION[user_id]'";

$minda_arr= mysqli_fetch_row ($query);


$query=mysqli_query($mysqli, "SELECT * FROM offer WHERE user_id='$_SESSION[user_id]'");
$ar_minda_arr = mysqli_fetch_row($query);

$logo_align="1";
?>

here is an image

最佳答案

线路

$query = mysqli_query ($mysqli,
"SELECT * FROM wants WHERE user_id='$_SESSION[user_id]'";

缺少尾随),即

$query = mysqli_query ($mysqli,
"SELECT * FROM wants WHERE user_id='$_SESSION[user_id]'");

关于php - 解析错误 : syntax error, 意外 ';',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35136336/

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