The user detail could not save in the database.when the user enters their details, the information is not showing the database. What is the problem and how do I go about it. I need you guys to help check it.
<?php
error_reporting(0);
session_start();
include 'connect.php';
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$address = $_POST['address'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$password = $_POST['password'];
$retype_password = $_POST['retype_password'];
$sql = "INSERT INTO 'user_registration' (firstname, lastname, address, phone, email, password) VALUES ('$firstname',
'$lastname', '$address', '$phone', '$email', '$password')";
If ($_POST ['submit']) {
if (mysqli_query($dbcon, $sql)){
echo "Regsiter successfully";
}
else {
$error = '<br><div class="info">Sorry, your account could not be created at the moment. Please try again or contact the site admin to report this error if the problem persist. Thanks.</div><br>';
}
}
?>
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Alex Ticketing System</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="css/vendor.css">
<!-- Theme initialization -->
<script>
var themeSettings = (localStorage.getItem('themeSettings')) ? JSON.parse(localStorage.getItem('themeSettings')) :
{};
var themeName = themeSettings.themeName || '';
if (themeName)
{
document.write('<link rel="stylesheet" id="theme-style" href="css/app-' + themeName + '.css">');
}
else
{
document.write('<link rel="stylesheet" id="theme-style" href="css/app.css">');
}
</script>
</head>
<body>
<div class="auth">
<div class="auth-container">
<div class="card">
<header class="auth-header">
<h1 class="auth-title">
<div class="logo"> <span class="l l1"></span> <span class="l l2"></span> <span class="l l3"></span> <span class="l l4"></span> <span class="l l5"></span> </div> Alex Ticketing System </h1>
</header>
<div class="auth-content">
<p class="text-xs-center">REGISTRATION</p>
<form id="signup-form" action="index.php" method="POST" novalidate="">
<div class="form-group"> <label for="firstname">Name</label>
<div class="row">
<div class="col-sm-6"> <input type="text" class="form-control underlined" name="firstname" id="firstname" placeholder="Enter firstname" required=""> </div>
<div class="col-sm-6"> <input type="text" class="form-control underlined" name="lastname" id="lastname" placeholder="Enter lastname" required=""> </div>
</div>
</div>
<div class="form-group"> <label for="address">Address</label> <input type="textarea" class="form-control underlined" name="address" id="address" placeholder="Enter your address" required=""> </div>
<div class="form-group"> <label for="phone">Phone</label> <input type="text" class="form-control underlined" name="phone" id="phone" placeholder="Enter your phone" required=""> </div>
<div class="form-group"> <label for="email">Email</label> <input type="email" class="form-control underlined" name="email" id="email" placeholder="Enter email address" required="" > </div>
<div class="form-group"> <label for="password">Password</label>
<div class="row">
<div class="col-sm-6"> <input type="password" class="form-control underlined" name="password" id="password" placeholder="Enter password" required=""> </div>
<div class="col-sm-6"> <input type="password" class="form-control underlined" name="retype_password" id="retype_password" placeholder="Re-type password" required=""> </div>
</div>
</div>
<div class="form-group"> <button type="submit" name = "submit" class="btn btn-block btn-primary">Sign Up</button> </div>
<div class="form-group">
<p class="text-muted text-xs-center">Already have an account? <a href="login.php">Login!</a></p>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Reference block for JS -->
<div class="ref" id="ref">
<div class="color-primary"></div>
<div class="chart">
<div class="color-primary"></div>
<div class="color-secondary"></div>
</div>
</div>
<script src="js/vendor.js"></script>
<script src="js/app.js"></script>
</body>
</html>
T