0
<?php @session_start(); ?>
<?php require_once('ConnectionDB/ConnectionsDB.php'); ?>
<?php
//if((isset($_SESSION["Access_Level"]))&&($_SESSION["Access_Level"] == 2))
//{
//  
//}
//else
//{
//  header('Location: HH_LogIn.php' );
//}
?>
<?php 
    if(isset($_POST['LogOut']))
    {
        unset($_SESSION["Access_Level"]);
        session_destroy();
        header('Location: HH_LogIn.php' );  
    }
    ?>

<?php

if(isset($_POST['Register']))
{
    echo "im here";
    $Fname = $_POST['First_Name'];
    $Lname = $_POST['Last_Name'];
    $Email = $_POST['Email'];
    $Dob = $_POST['Date'];
    $Contact = $_POST['Contact'];
    $Username = $_POST['UserName'];
    $Password = $_POST['Password'];

    $insertion = $Connect->query("INSERT INTO candidate (CAN_FNAME, CAN_LNAME, CAN_DOB, CAN_CONTACT, EMAIL, USERNAME, PASSWORD)VALUES('{$Fname}','{$Lname}','{$Dob}','{$Contact}','{$Email}','{$Username}','{$Password}')");

    if($insertion)
    {
        echo "this is happening";
        header('Location:Candidate.php' );
    }

}
?>

It only helps me register the values into my database only once, and in the second attempt to register a new data or insert it to my database it doesn't happen.

I have tried and tried, can some one please identify where im going wrong.

Please Help

Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
Shalvin
  • 188
  • 1
  • 1
  • 12

0 Answers0