Israel

Israel

  • 698
  • 1.3k
  • 219.8k

The same syntax error at the last line

Dec 2 2019 8:53 AM
Hi Sirs,
I am passing night just to know how to resolv my problem.
I always receive this message error on the last line. Please how to resolv it?
in my insert.php
<?php
if(isset($_POST))
{
if ($_POST["name"] || $_POST["email"] || $_POST["password"])
{
$name = $_POST['name'];
$email = $_POST['email'];
$password = $_POST['password'];
if($name && $email && $password)
{
mysqli_query("INSERT INTO users(name,email,password) VALUES('$name','$email','$password')");
$registered = mysqli_affected_rows();
echo "$registered was insered";
}
else
{
echo "You have to complete the form";
}
?>
into my form.php
<html
<head>
</head>
<form method="post" action="insert.php">
<body>
Name: <input type = "text" name="name" /><br />
Email: <input type = "text" name="email" /><br />
Password: <input type = "password" name="password"/><br />
<p>
<input type="submit" value="register" /><br/>
</body>
</form>

Answers (3)