<?php
include 'db_connection.php';
$name = $_POST['name'];
$password = $_POST['password'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$conn = OpenCon();
echo "<br><br>Connected Successfully";
$sql = "INSERT INTO 'customer'('customer name','password','email','phone number') VALUES([$name], [$password], [$email], [$phone]);";
if (mysqli_query($conn, $sql)) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($conn);
}
?>
这段代码在尝试使用 INSERT 语句时给我错误。我使用 $conn 变量创建了 DBConenction。
慕妹3242003
森栏
相关分类