I am a beginner in PHP. And decided to make a fully working model of a registration form. But when I program it, it doesn't work.
Here is the main HTML code
<html>
<form method="POST">
<input required type="text" name="name" placeholder="Your Name"><br>
<input required type="email" name="email" placeholder="Your Email"><br>
<input required type="password" name="pass" placeholder="Your Password"><br>
<button name="submit" type="submit" value="Submit">Submit</button>
</form>
</html>
Here is the PHP code
<?php
$conn = mysqli_connect("localhost", "root", "", "shayeq");
if (isset($_POST['submit'])) {
# code...
$user = $_POST['name'];
$email = $_POST['email'];
$pass = $_POST['pass'];
$sql = "INSERT INTO 'user'(name, email, password) VALUE ('$user', '$email', '$pass')"
}