これは私のphpコードです:
include ("dbinfo.php");
if(isset($_POST['editsave'])){
$edittitle=$_POST["edittitle"];
$editurl=$_POST["editurl"];
$editdesc=$_POST["editdesc"];
$editid=$_POST["editid"];
$mysqli = $GLOBALS['dbc'];
$stmt = $mysqli->prepare("UPDATE links SET title = ?,
\desc = ?
WHERE id = ?");
$stmt->bind_param('ssd',
$_POST['edittitle'],
$_POST['editdesc'],
$_POST['editid']);
$stmt->execute();
$stmt->close();
}
これは私のフォームです:
<form role="form" action="edit.php" method="post">
<div class="form-group">
<label for="title">Title</label>
<input type="text" name="edittitle" class="form-control" id="title" placeholder="Enter title" maxlength="70" value="<?php echo ($title); ?>">
</div>
<div class="form-group">
<label for="url">URL</label>
<input type="text" name="editurl" class="form-control" id="url" value="<?php echo ($url); ?>" disabled>
</div>
<div class="form-group">
<label for="desc">Description</label><small> (max 500 characters)</small>
<textarea class="form-control" name="editdesc" id="desc" rows="5" maxlength="500"><?php echo ($desc); ?></textarea>
</div>
<div>
<input type="hidden" name="editid" value="<? echo $id; ?>">
<button type="submit" name="editsave" class="btn btn-primary">Save changes</button>
</div>
</form>
送信を押すと、次のようになります。
致命的なエラー: 27 行目で、/storage/content/x/xxx/ の非オブジェクトに対してメンバー関数 bind_param() を呼び出します。
27 行目は次のとおりです。
$stmt->bind_param('ssd',
私はmysqliに精通していません。私は数日間問題を解決しようとしましたが、気が狂っています。