While creating my website, I was working on a Sign-Up and Login database when I ran into an error I can not seem to shake. While trying to store a users 'Name', 'Email', and 'Password' it is not being inserted into my MySQLi database.
Connections.php:
<?php
$con = mysqli_connect("localhost", "root", "", "kappa-sigma");
?>
Index.php:
<?php require 'Connections/connections.php'?>
<?php
if (!$con) {
die("Connection failed: " . mysqli_connect_error());
}
if(isset($_POST['Register'])) {
session_start();
$FName = $_POST['First_Name'];
$LName = $_POST['Last_Name'];
$Email = $_POST['Email'];
$PW = $_POST['Password'];
$sql = $con->query("INSERT INTO user (Fname, Lname, Email, Password)VALUES ('$FName','$LName','$Email','$PW')");
}
?>
I am using WAMPserver and phpMyAdmin but after submitting the HTML form nothing is added to the kappa-sigma database.