I want to assign a unique id for each registration attempt by users and display that unique ID based on first name and last name after completion of registration...Here are my incomplete sets of codes.
<?php
session_start();
include('includes/config.php');
if(isset($_POST['submit']))
{
$regno=$_POST['regno'];
$fname=$_POST['fname'];
$mname=$_POST['mname'];
$lname=$_POST['lname'];
$gender=$_POST['gender'];
$contactno=$_POST['contact'];
$emailid=$_POST['email'];
$password=$_POST['password'];
$query="insert into
userRegistration
(regNo,firstName,middleName,lastName,gender,contactNo,email,pas
sword) values(?,?,?,?,?,?,?,?)";
$stmt = $mysqli->prepare($query);
$rc=$stmt->bind_param
('sssssiss',$regno,$fname,$mname,$lname,$gender,$contactno,$emailid,$
password);
$stmt->execute();
echo"<script>alert('Registration successfully done');</script>";
}
?>