-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorderHelper.php
70 lines (56 loc) · 1.76 KB
/
orderHelper.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
error_reporting(0);
include_once 'include/global.inc.php';
//check to see that the form has been submitted
if($_SERVER['REQUEST_METHOD'] == 'POST') {
if($_GET['check']=="manufacturer"){
$manufacturer = $_REQUEST['Manufacturer_list'];
$tableName="accessories_model";
$where="accessories_id=$manufacturer";
$modelList=$db->select($tableName,"",$where);
echo "<option value=''>---SELECT---</option>";
foreach($modelList as $model){
echo "<option value='$model[id]'>$model[model]</option>";
}
}
else if($_GET['check']=="model"){
$model = $_REQUEST['Model_list'];
$tableName="accessories_type";
$where="accessories_model_id=$model";
$typeList=$db->select($tableName,"",$where);
echo "<option value=''>---SELECT---</option>";
foreach($typeList as $type){
echo "<option value='$type[id]'>$type[name]</option>";
}
}
else{
$type = $_REQUEST['Type_list'];
echo $type;
$tableName="accessories_color";
$where="accessories_type_id=$type";
$colorList=$db->select($tableName,"",$where);
echo "<option value=''>---SELECT---</option>";
foreach($colorList as $color){
echo "<option value='$color[id]'>$color[color_name]</option>";
}
}
//$userid=$_REQUEST['user_id'];
//print_r($userid);
}
//echo $manufacturer;
// $data = array(
// "user_id" => "$userid",
// "make" => "'$make'",
// "status" => "1",
// "created_at" => "'".date("Y-m-d H:i:s",time())."'"
// );
// $chkid = $db->verifyMake($make);
// $chkid = 0;
// if ($chkid == 0 ) {
// $id = $db->insert($data, 'accessories');
// echo 1;
// } else if($chkid == 1){
// echo 2;
// exit();
// }
?>