-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetcustomer.php
39 lines (26 loc) · 1.12 KB
/
setcustomer.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
<?php
session_start();
if($_POST['User_Type']=='Daily')
{
if(!empty($_POST['user_type'])) {
include_once("Config.php"); //connect to data base to take F_name and L_name
$res = $pro->findOne(array('Customer.U_name' =>$_POST['user_type']));
if($res)
{
$_SESSION['customer_type']=$_POST['user_type'];
$_SESSION['Customer_Type']=$_POST['User_Type'];
header("location:select_pro.php");
}
else
{
echo "<script type='text/javascript'>alert('No Such a Customer user name in registered customer');window.location.href='take_order.php';</script>";
}
}
}
if($_POST['User_Type']=='General')
{
$_SESSION['customer_type']=$_POST['user_type'];
$_SESSION['Customer_Type']=$_POST['User_Type'];
header("location:select_pro.php");
}
?>