-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.php
executable file
·78 lines (55 loc) · 2.27 KB
/
test.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
<?php
include_once("database.php");
$conn = new PDO();
$userFN = $_POST['firstname'];
$userLN = $_POST['lastname'];
$userEM = $_POST['email'];
$userAdd = $_POST['street'];
$userCity = $_POST['city'];
$userState = $_POST['state'];
$userZip = $_POST['zip'];
$userAge = $_POST['age'];
$userJob = $_POST['occu1'];
$userSM = $_POST['SM'];
$donateAmt = $_POST['amount'];
$cc = $_POST['cc'];
$mural = $_POST['muralname'];
$land = $_POST['landmark']
$artist = $_POST['artistname'];
$muralAdd = $_POST['streetM'];
$muralCity = $_POST['cityM'];
$muralState = $_POST['stateM'];
$muralZip = $_POST['zipM'];
$country = $_POST['countryM'];
$imagePath = $_POST['pic'];
}
/*
$ins = "INSERT INTO 'Member' ('fname', 'lname', 'email', 'address', 'city', 'state', 'zip', 'occupation', 'socialMedia') VALUES('$userFN','$userLN','$userEM','$userAdd','$userCity','$userState','$userZip','$userJob','$userSM'");
header("Location:join.html, donate.html, upload.html")
*/
$ins1 = "INSERT INTO Donate(donateAmt,cc ) VALUES('$donateAmt','$cc'");
$rec = $db->query($ins1);
/*
$ins = "INSERT INTO Member(fname,lname,email,address,city,state,zip,occupation,socialMedia) VALUES('$userFN','$userLN','$userEM','$userAdd','$userCity','$userState','$userZip','$userJob','$userSM')";
$rec = $conn->query($ins);
$dataSource = $_POST['dataSource'];
$userInput = $_POST['userInput'];
switch( $dataSource ){
case "join":
$ins2 = "INSERT INTO Member(fname,lname,email,address,city,state,zip,occupation,socialMedia) VALUES('$userFN','$userLN','$userEM','$userAdd','$userCity','$userState','$userZip','$userJob','$userSM')";
$rec2 = $db->query($ins2);
break;
case "donate":
$ins1 = "INSERT INTO Donate(donateAmt, memberID, ) VALUES('$donateAmt','','$cc')";
$rec = $db->query($ins1);
break;
case "login":
echo "Login";
break;
case "upload":
$ins3 = "INSERT INTO Mural(name,landmark,artist,address,city,state,zip,country,imagePath)VALUES('$mural','$land','$artist','$muralAdd','$muralCity','$muralState','$muralZip','$country','$imagePath'");
$rec3 = $db->query($ins3);
break;
}
*/
?>