就是这样,我无法将 2 个输入放在一起,然后将其放入数据库
问题是数据库看起来像这样0000-00-00 00:00:00
这就是我选择将日期和时间分开以使其尽可能简单的方式。
function tilmeldAdmin()
{
if ($stmt = $this->mysqli->prepare('INSERT INTO `tilmeldt` (`title`, `info`, `Dato`, `antal`, `opret_navn`, `opret_email`, `opret_id`) VALUES (?, ?, ?, ?, ?, ?, ?)')) {
$stmt->bind_param('sssissi', $title, $info, $Dato, $antal, $opret_navn, $opret_email, $opret_id);
$title = $_POST["title"];
$info = $_POST["info"];
$Dato = $_POST["dob"] . $_POST["time"];//Here is error when it should be entered into the database (Everything else works just fine with no problems)
$antal = $_POST["antal"];
$opret_navn = $_SESSION["navn"];
$opret_email = $_SESSION["mail"];
$opret_id = $_SESSION["id"];
$stmt->execute();
$stmt->close();
}
}