gpt4 book ai didi

PHP - fatal error : Can't use function return value in write context in

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

当我加载页面时,我收到此错误:

Fatal error: Can't use function return value in write context in C:\Program Files\EasyPHP-5.3.9\www\cglst\images\addform.php on line 16

这是我的前 28 行代码:

//load listings from database:
require_once "login.php";
$db_server = mysql_connect($db_hostname, $db_username, $db_password);

//to do: redirect to an "error encountered page"
if (!$db_server)
die("Unable to connect to MySql databse: " . mysql_error());

mysql_select_db($db_database, $db_server)
or die("Unable to select database: " . mysql_error());

$deleted=false;

//if record deletion was selected, delete the record:
if (isset($_POST['delete']) && isset($_POST('delid'))) // <-- line 16
{
$deleted = true;
$delID = get_post('delid');
$query = 'PREPARE statement FROM "DELETE FROM bix WHERE ID=?"';
mysql_query($query);
$query = 'SET @ID = "' . $delID . '"';
mysql_query($query);
$query = 'EXECUTE statement USING @ID';
mysql_query($query);
$query = 'DEALLOCATE PREPARE statement';
mysql_query($query);
}

这些代码都是非常不言自明的——我正在打开一个数据库,如果请求删除数据,它就会删除该数据。

最佳答案

$_POST('delid') 应为 $_POST['delid']get_post('delid')

关于PHP - fatal error : Can't use function return value in write context in,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9753922/

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