I am trying to insert a new row into a phpmyadmin database but the code won't add a row. The code runs with no errors or warnings.
$sql = "INSERT INTO DB (val1,val2) VALUES (?,?);"; $stmt = mysqli_stmt_init($conn); if (!mysqli_stmt_prepare($stmt,$sql)) { header("Location: index.php?error"); exit(); } mysqli_stmt_bind_param($stmt,"ss",$var1,$var2); mysqli_stmt_execute($stmt); header("Location:index.php"; exit();
https://stackoverflow.com/questions/65432791/sql-command-not-inserting-row-into-table December 24, 2020 at 09:06AM
没有评论:
发表评论