-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontactusadmin.php
131 lines (123 loc) · 4.54 KB
/
contactusadmin.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
128
129
130
131
<?php include("adminhead.php");?>
<?php
if(isset($_POST["submit"])){
if(isset($_POST["office_add"])){
$temp=$_POST["office_add"];
$sql="Update contactus set office_add= '$temp' ";
$result=mysqli_query($conn,$sql);
}
if(isset($_POST["phnochar"])){
$temp=$_POST["phnochar"];
$sql="Update contactus set phnochar= '$temp' ";
$result=mysqli_query($conn,$sql);
}
if(isset($_POST["factory_add"])){
$temp=$_POST["factory_add"];
$sql="Update contactus set factory_add= '$temp' ";
$result=mysqli_query($conn,$sql);
}
if(isset($_POST["salesemail"])){
$temp=$_POST["salesemail"];
$sql="Update contactus set salesemail= '$temp' ";
$result=mysqli_query($conn,$sql);
}
if(isset($_POST["helpdeskemail"])){
$temp=$_POST["helpdeskemail"];
$sql="Update contactus set helpdeskemail= '$temp' ";
$result=mysqli_query($conn,$sql);
}
Redirect("contactusadmin.php");
}
?>
<?php
$sql="select * from contactus";
$result=mysqli_query($conn,$sql);
while($rows=mysqli_fetch_array($result)){?>
<div class="adminright flex flex-col flex-center">
<div>
<form class="card contact-card " method="POST" action="">
<table >
<tbody>
<tr>
<td> Office </td>
</tr>
<tr>
<td>address</td>
<td>
<textarea name="office_add" id="" cols="30" rows="5">
<?php echo $rows['office_add']?>
</textarea>
</td>
</tr>
<tr>
<td>Phone No</td>
<td>
<input type="tel" name="phnochar" id="phnochar"
value="<?php echo $rows['phnochar']?>" />
</td>
</tr>
<tr>
<td>
<input type="submit" value="Update" name="submit" id="submit">
</td>
</tr>
</tbody>
</table>
</form>
<form class="card contact-card" method="POST" action="">
<table>
<tbody>
<tr>
<td> Factory</td>
</tr>
<tr>
<td>address</td>
<td>
<textarea name="factory_add" id="" cols="30" rows="5">
<?php echo $rows['factory_add']?>
</textarea>
</td>
</tr>
<tr>
<td>
<input type="submit" value="Update" name="submit" id="submit">
</td>
</tr>
</tbody>
</table>
</form>
<form class="card contact-card" method="POST" action="">
<table>
<tbody>
<tr>
<td>Emails</td>
</tr>
<tr>
<td>salesemail</td>
<td>
<input type="email" name="salesemail" id="salesemail"
value="<?php echo $rows['salesemail']?>" />
</td>
</tr>
<tr>
<td>helpdeskemail</td>
<td>
<input type="email" name="helpdeskemail" id="helpdeskemail"
value="<?php echo $rows['helpdeskemail']?>" />
</td>
</tr>
<tr>
<td>
<input type="submit" value="Update" name="submit" id="submit">
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<?php
}
?>
</body>
</html>