-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemployee_signup.php
33 lines (30 loc) · 910 Bytes
/
employee_signup.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
<?php
include 'config.php';
include_once 'saloon_class.php';
include_once 'user_class.php';
if ($_SERVER["REQUEST_METHOD"] == "POST"){
session_start();
$user = new employee($_POST["username"]);
$user->setpw($_POST["password"]);
$user->setname($_POST["Name"]);
$user->setphoneno($_POST["PhoneNum"]);
$user->set_salary($_POST["salary"]);
$creater = new employee($_SESSION["uname"]);
$saloon = $creater->get_saloon();
$user->set_saloon($saloon);
$user->addintodb();
$user->add_into_table();
$uname = $_SESSION["uname"];
$user = new employee($uname);
if ($user->is_employee()){
header("Location: employee_interface.html");
exit();
}
else {
header("Location: admin_menu.html");
exit();
}
header("Location: login_page.html");
exit();
}
?>