-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbankprojecttest.php
63 lines (45 loc) · 1.34 KB
/
bankprojecttest.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
<?php
$obj = new homepage;
class homepage{
public $form =
'<body><h3>Sign in here: </h3>
<FORM action="bankprojecttest.php" method="post">
<P>
<LABEL for="username">Username: </LABEL>
<INPUT type="text" name="username" id="username"><BR>
<LABEL for="password">Password: </LABEL>
<INPUT type="password" name="password" id="password"><BR>
<INPUT type="submit" value="Send"> <INPUT type="reset">
</P>
</FORM>
<h3> If you are a new user, click <a href="bankprojecttest.php?class=signup">here </a></h3></body>';
public function __construct(){
if($_SERVER['REQUEST_METHOD']=='GET'){
echo $this->form;
}else{
print_r($_POST);
}
}
}
class signup{
public $form =
'<FORM action="http://mywebclass.org" method="post">
<P>
<LABEL for="firstname">First name: </LABEL>
<INPUT type="text" name="firstname" id="firstname"><BR>
<LABEL for="lastname">Last name: </LABEL>
<INPUT type="text" name="lastname" id="lastname"><BR>
<LABEL for="email">email: </LABEL>
<INPUT type="text" name="email" id="email"><BR>
<INPUT type="submit" value="Send"> <INPUT type="reset">
</P>
</FORM>';
public function __construct(){
if($_SERVER['REQUEST_METHOD']=='GET'){
echo $this->form;
}else{
$users = fopen("users.csv", "a");
}
}
}
?>