我只想将信息从文本表单传输到数据库中,但该值没有正确显示在数据库中。这是我所拥有的:
HTML 代码,用于表单:
<form method="post" action="process.php">
<input type="text" maxlength="150" name="textbox">
<input type="submit" name="submit">
</form>
进程.php
<?php
$con=mysqli_connect($host, $username, $password, $database);
$sql = mysqli_query($con,"INSERT INTO notes (User, Note)
VALUES ('test', '$_POST [textbox]')");
// I also tried writing $_POST ['textbox'] instead; didn't make a difference.
?>
但是,数据库中的输出如下:
用户:测试
注意:数组[文本框]
我如何能够更正“注释”列中的值(即使其成为表单中输入的值)?