-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpersonnel-ekle.php
42 lines (34 loc) · 971 Bytes
/
personnel-ekle.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
session_start();
if((!isset($_SESSION["login"]))||($_SESSION["auth"]=="0")){
?>
<meta http-equiv="refresh" content="0;URL=login.php">
<?php
} else
{
?>
<?php include("header.php") ?>
<section id="content">
<?php
$nameSurname=$_POST['nameSurname'];
$passWord=$_POST['passWord'];
$eMail=$_POST['eMail'];
$phone=$_POST['phone'];
$userName=$_POST['userName'];
if(isset($_POST['auth']) && $_POST['auth']=="on") {
$auth=1;
} else {
$auth=0;
}
$situation=$connection->query("insert into personnel (userName,passWord,eMail,phone];?>,nameSurname,auth) values ('$userName','$passWord','$eMail','$phone','$nameSurname','$auth')") or die ($lang["Something_bad_happened"]);
if($situation){
$status="<h2>".$lang["Process_Successful"]."</h2>";
}else{
$status="<h2>".$lang["Process_Failed"]."</h2>";
}
echo"$status";
echo" <meta http-equiv=\"refresh\" content=\"0;url=personnel.php\"> ";
?>
</section>
<?php include("footer.php"); ?>
<?php } ?>