This repository has been archived by the owner on Nov 17, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Register.php
119 lines (109 loc) · 1.99 KB
/
Register.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<?php
require_once 'Buisness/dbconfig.php';
require_once 'Buisness/Member.cls.php';
require_once 'Buisness/MemeberType.cls.php';
require_once 'Buisness/Adress.cls.php';
?>
<?php
if(isset($_POST["zip"])){
//member needs adress
$adress = new Adress();
$adress->setAdd_adress($_POST["adress"]);
$adress->setAdd_city($_POST["city"]);
$adress->setAdd_state($_POST["state"]);
$adress->setPk_add_zip($_POST["zip"]);
$result = $adress->create($connectionId);
if(!$result){
echo $connectionId->errorInfo()[2];
}
$member = new Member();
//$member->setPk_mem_id($_POST["id"]);
$member->setMem_phone($_POST["phone"]);
$member->setMem_password($_POST["password"]);
$member->setMem_name($_POST["name"]);
$member->setMem_email($_POST["email"]);
$member->setFk_memType_id("2");
$member->setFk_add_zip($adress->getPk_add_zip());
//$member->create($connectionId);
$result = $member->create($connectionId);
if(!$result){
echo $connectionId->errorInfo()[2];
}
}
?>
<form method="post">
<table>
<tr>
<td>
Name:
</td>
<td>
<input type="text" name="name"/>
</td>
</tr>
<tr>
<td>
Phone:
</td>
<td>
<input type="text" name="phone"/>
</td>
</tr>
<tr>
<td>
Email:
</td>
<td>
<input type="email" name="email"/>
</td>
</tr>
<tr>
<td>
Password:
</td>
<td>
<input type="password" name="password"/>
</td>
</tr>
<tr>
<td>
Zip:
</td>
<td>
<input type="text" name="zip"/>
</td>
</tr>
<tr>
<td>
State:
</td>
<td>
<input type="text" name="state"/>
</td>
</tr>
<tr>
<td>
City:
</td>
<td>
<input type="text" name="city"/>
</td>
</tr>
<tr>
<td>
Adress:
</td>
<td>
<input type="text" name="adress"/>
</td>
</tr>
<tr>
<td>
<input type="submit" value="Register"/>
</td>
<td>
<input type="reset" value="Clear" />
</td>
</tr>
</table>
</form>