-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsert_bee.php
More file actions
67 lines (55 loc) · 1.51 KB
/
insert_bee.php
File metadata and controls
67 lines (55 loc) · 1.51 KB
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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Insert PDF</title>
<style media="screen">
div{
border: 2px solid black;
width: 500px;
margin-left: 370px;
margin-top: 50px;
padding: 30px;
}
form{
margin-left: 70px;
}
label{
font-size: 25px;
font-weight: bold;
}
#pdf{
font-size: 20px;
font-weight: bold;
margin-top: 10px;
}
#upload{
font-size: 20px;
font-weight: bold;
margin-left: 100px;
}
</style>
</head>
<body>
<div class="">
<form class="" action="insert_bee.php" method="post" enctype="multipart/form-data">
<label for="">Choose Your PDF File</label><br>
<input id="pdf" type="file" name="pdf" value="" required><br><br>
<input id="pdf" type="submit" name="submit" value="Upload">
<?php
include 'db_bee.php';
if (isset($_POST['submit'])) {
$pdf=$_FILES['pdf']['name'];
$pdf_type=$_FILES['pdf']['type'];
$pdf_size=$_FILES['pdf']['size'];
$pdf_tem_loc=$_FILES['pdf']['tmp_name'];
$pdf_store="pdfbee/".$pdf;
move_uploaded_file($pdf_tem_loc,$pdf_store);
$sql="INSERT INTO pdf_bee_file(pdf) values('$pdf')";
$query=mysqli_query($conn,$sql);
}
?>
</form>
</div>
</body>
</html>