<?php
	include_once('../config.php');   
	             
    if(!isset($_SESSION['userId']))
    { 
         header("Location: ../");
         die;
    } 
     
    if(isset($_POST['submit']))
    {
        
            $CustId = substr(str_shuffle('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'),0, 8);  
            $stmt=$conn->prepare("insert into  UI__Rgst (nm,phm,eml,pwd,custId,is_active) values(:nm,:phm,:eml,:pwd,:custId,:is_active) ");   
            $stmt->bindValue(':nm', $_POST['Fname'] , PDO::PARAM_STR); 
            $stmt->bindValue(':phm',  $_POST['ph_no'] , PDO::PARAM_INT); 
            $stmt->bindValue(':eml', $_POST['email'] , PDO::PARAM_STR); 
            $stmt->bindValue(':pwd', $_POST['passwprd'] , PDO::PARAM_STR); 
            $stmt->bindValue(':custId', $CustId, PDO::PARAM_STR);  
            $stmt->bindValue(':is_active', 1, PDO::PARAM_STR);    
            $stmt->execute(); 
            $_SESSION['Regis'] = "Registration Done";
            header("Location: registration.php");
            die;  
    }
            

  
                
include_once("../view/dashboard/PayoutSetp1.php");
?>