-
Notifications
You must be signed in to change notification settings - Fork 0
/
guiEmail.php
52 lines (51 loc) · 2.04 KB
/
guiEmail.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
<?php
$connect = new mysqli("localhost", "root", "", "qlnhanvien1");
$output = '';
if(isset($_POST["query"]))
{
$search = mysqli_real_escape_string($connect, $_POST["query"]);
$query = "
SELECT * FROM nhanvien
WHERE ten LIKE '%".$search."%'";
$result = $connect->query($query);
if($result->num_rows > 0)
{
while($row = $result->fetch_assoc())
{
$output = '
<div>
<form method="POST" accept-charset=”utf-8” id="fm">
<div class="form-row form-group col-xl-12">
<h4 style="color: white;">Thông tin email</h4>
</div>
<div class="form-row form-group col-xl-12">
<input type="text" class="form-control" placeholder="Tiêu đề Email" name="tieude" required value="">
</div>
<div class="form-row form-group col-xl-12">
<input type="text" class="form-control" placeholder="Nội dung Email" name="ndemail" required value="">
</div>
<div class="form-row col-xl-12">
<div class="form-group col-xl-12">
<input type="text" class="form-control" placeholder="Tên nhân viên" name="tnv" required value="'.$row['ten'].'">
</div>
</div>
<div class="form-row col-xl-12">
<div class="form-group col-xl-12">
<input type="text" class="form-control" placeholder="Email" name="em" required value="'.$row['email'].'">
</div>
</div>
<div class="form-row form-group col-xl-12 text-center">
<input type="submit" value="Gửi email" class="btn btn-primary" name="btnguiemail">
</div>
</form>
</div>
';
}
echo $output;
}
else
{
echo 'Nhập sai nhập lại';
}
}
?>