-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.php
127 lines (75 loc) · 5.35 KB
/
database.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
120
121
122
123
124
125
126
127
<?php
$conn=mysqli_connect("localhost","root","","sessionpractical");
if(isset($_POST['submit']))
{
$name = ($_POST['name']);
$email = ($_POST['email']);
$tele=($_POST['telephone']);
$department=($_POST['department']);
$roll=($_POST['roll']);
$current_edu_yar=($_POST['current']);
$result=($_POST['result']);
$date_of_birth=($_POST['date']);
$religion=($_POST['religion']);
$father_name=($_POST['Father']);
$father_income=($_POST['father2']);
$father_occupation=($_POST['father1']);
$address=($_POST['address']);
$hall_choice=($_POST['hall_choice']);
$bank_receipt=($_POST['bank']);
$details_roomate=($_POST['roomate']);
if($hall_choice=='Shahid President Ziaur Rahman Hall'){
$zia="insert into zia (Id,name,email,telephone,department,roll,current_edu_year,result,address,date_of_birth,father_name,father_occupation,father_income,hall_choice,roomates,bank_recepit) values('','$name', '$email', '$tele','$department','$roll','$current_edu_yar','$result','$address','$date_of_birth','$father_name','$father_occupation','$father_income','$hall_choice','$details_roomate','$bank_receipt');";
if( mysqli_query($conn,$zia)){
echo "Data are successfully inserted";
}
}
// for hamid hall
if($hall_choice=='Shahid Abdul Hamid Hall'){
$hamid="insert into hamid (Id,name,email,telephone,department,roll,current_edu_year,result,address,date_of_birth,father_name,father_occupation,father_income,hall_choice,roomates,bank_recepit) values('','$name', '$email', '$tele','$department','$roll','$current_edu_yar','$result','$address','$date_of_birth','$father_name','$father_occupation','$father_income','$hall_choice','$details_roomate','$bank_receipt');";
if( mysqli_query($conn,$hamid)){
echo "Data are successfully inserted";
}
}
// for Tinshed hall
if($hall_choice=='Tinshed hall'){
$tin="insert into tin (Id,name,email,telephone,department,roll,current_edu_year,result,address,date_of_birth,father_name,father_occupation,father_income,hall_choice,roomates,bank_recepit) values('','$name', '$email', '$tele','$department','$roll','$current_edu_yar','$result','$address','$date_of_birth','$father_name','$father_occupation','$father_income','$hall_choice','$details_roomate','$bank_receipt');";
if( mysqli_query($conn,$tin)){
echo "Data are successfully inserted";
}
}
if($hall_choice=='Shahid Shahidul Islam Hall'){
$Shahidul="insert into shahidul (Id,name,email,telephone,department,roll,current_edu_year,result,address,date_of_birth,father_name,father_occupation,father_income,hall_choice,roomates,bank_recepit) values('','$name', '$email', '$tele','$department','$roll','$current_edu_yar','$result','$address','$date_of_birth','$father_name','$father_occupation','$father_income','$hall_choice','$details_roomate','$bank_receipt');";
if( mysqli_query($conn,$Shahidul)){
echo "Data are successfully inserted";
}
}
// for Mujibur
if($hall_choice=='Bangabandhu Sheikh Mujibur Rahman Hall'){
$mujib="insert into mujibur (Id,name,email,telephone,department,roll,current_edu_year,result,address,date_of_birth,father_name,father_occupation,father_income,hall_choice,roomates,bank_recepit) values('','$name', '$email', '$tele','$department','$roll','$current_edu_yar','$result','$address','$date_of_birth','$father_name','$father_occupation','$father_income','$hall_choice','$details_roomate','$bank_receipt');";
if( mysqli_query($conn,$mujib)){
echo "Data are successfully inserted";
}
}
//for selim hall
if($hall_choice=='Shahid Lt Selina Hall'){
$selim="insert into selim (Id,name,email,telephone,department,roll,current_edu_year,result,address,date_of_birth,father_name,father_occupation,father_income,hall_choice,roomates,bank_recepit) values('','$name', '$email', '$tele','$department','$roll','$current_edu_yar','$result','$address','$date_of_birth','$father_name','$father_occupation','$father_income','$hall_choice','$details_roomate','$bank_receipt');";
if( mysqli_query($conn,$selim)){
echo "Data are successfully inserted";
}
}
// for Hasina hall
if($hall_choice=='Deshratna Sheikh Hasina Hall'){
$hasina="insert into hasina (Id,name,email,telephone,department,roll,current_edu_year,result,address,date_of_birth,father_name,father_occupation,father_income,hall_choice,roomates,bank_recepit) values('','$name', '$email', '$tele','$department','$roll','$current_edu_yar','$result','$address','$date_of_birth','$father_name','$father_occupation','$father_income','$hall_choice','$details_roomate','$bank_receipt');";
if( mysqli_query($conn,$hasina)){
echo "Data are successfully inserted";
}
}
else{
$ans="insert into student (Id,name,email,telephone,department,roll,current_edu_year,result,address,date_of_birth,father_name,father_occupation,father_income,hall_choice,roomates,bank_recepit) values('','$name', '$email', '$tele','$department','$roll','$current_edu_yar','$result','$address','$date_of_birth','$father_name','$father_occupation','$father_income','$hall_choice','$details_roomate','$bank_receipt');";
if( mysqli_query($conn,$ans)){
echo "Data are successfully inserted";
}
}
}
?>