<?php
require_once('conn1.php');
if (isset($_POST['submit'])){
$username = $_POST['username'];
$firstname = $_POST['first_name'];
$lastname = $_POST['last_name'];
$gender = $_POST['gender'];
$pw = $_POST['password'];
$value = "INSERT INTO user_details(username, first_name, last_name, gender, password) VALUES('$username', '$firstname', '$lastname', '$gender','$pw') ";
$check = mysqli_query($conn, $value);
if ($check) {
echo "<script>alert('Your Form Is Submit Successfully !');</script>";
} else {
echo "<script>alert('Something Went Wrong !');</script>";
}
mysqli_close($conn);
}
?>
但是表单数据没有保存在数据库中