0
データがDBに挿入されていないので間違ったmysqliクエリを実行したと思いますが、間違いを見つけようとしましたができませんでした。あなたは私を助けてくれますか?私はrapidphpで間違いを見つけようとしましたが、うまく動作しませんでした。私のPHPザッツmysqliクエリが間違っていますか?
:
if(isset($_POST['addclient']))
{
$name = $_POST['name'];
$last = $_POST['last'];
$email = $_POST['email'];
$password = $_POST['password'];
$address = $_POST['address'];
$phone = $_POST['phone'];
$hosting = $_POST['hosting'];
$hosting_name = $_POST['hosting_name'];
$hosting_password = $_POST['hosting_password'];
$registration = $_POST['registration'];
$notes = $_POST['notes'];
// checking empty fields
if(empty($email)) {
if(empty($email)) {
echo "<div class='alert alert-danger alert-dismissable'>
<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>
<center>Something went wrong.. </center>
</div>";
}
} else {
$result = mysqli_query($conn, "INSERT INTO clients (name,last,email,password,address,phone,hosting,hosting_name,hosting_password,registration,notes)
VALUES('$name','$last','$email','$password','$address','$phone','$hosting','$hosting_name','$hosting_password',now(),'$notes')");
echo"<div class='alert alert-success alert-dismissable'>
<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>
<center>Client successfully updated..</center>
</div>";
}
}
私はまた、HTMLは、それが正常に動作しているようだ形成にチェック。