if (isset($_POST['make_transaction'])) {
$amount = mysqli_real_escape_string($db_transactions, $_POST['amount']);
$PIN = mysqli_real_escape_string($db_transactions, $_POST['PIN']);
$pemail = mysqli_real_escape_string($db_transactions, $_POST['pemail']);
$type = mysqli_real_escape_string($db_transactions, $_POST['type']);
date_default_timezone_set("Europe/Athens");
$date = date('d-m-Y h:i:s A');
$status = "Awaiting approval";
$query = "INSERT INTO
transactions (amount, date, email, PIN, status, type)
VALUES(
'$amount',
'$date',
'$pemail',
'$PIN',
'$status',
'$type'
)
";
$result = mysqli_query($db_transactions, $query);
}
这是我文件的一部分。我从正确设置它们的形式获取var(我已经对其进行了测试),但是尽管数据库和行存在,但是都没有插入到数据库中。与数据库的连接也很完美。