<?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' );
}
}
?>
它只能帮助我将值注册到我的数据库中一次,并且在第二次尝试注册新数据或将其插入我的数据库时,它不会发生。
我已经尝试过,有人可以找出我出错的地方。
请帮助