I'm trying to create a register and login page using HTML and PHP but I keep getting an ERROR 500.
<?php
    $Fname = $_POST['FName'];
    $Lname = $_POST['LName'];
    $Email = $_POST['Email'];
    $Password = $_POST['Password'];
    // Connect to MySQL
    $conn = new mysqli('localhost', 'root', '', 'users');
    if($conn->connect_error) {
        die('Connection Error: '. $conn->connect_error);
    } else {
        $insert = "INSERT INTO user_form(first_name, last_name, email, password) VALUES(?, ?, ?, ?)";
        $stmt = $conn.prepare($insert); // <--
        $stmt->bind_param('ssss', $Fname, $Lname, $Email, $Password);
        $stmt->execute();
        echo 'Registered';
        $stmt->close();
        $conn->close();
    }
?>
I'm using MAMP for my localhost and the database was created in phpmyadmin. I'm pretty sure the ERROR comes up at $stmt = $conn.prepare($insert); but it may be somewhere else too.
 
    