-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproreport_form.php
80 lines (56 loc) · 1.58 KB
/
proreport_form.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
<?php
require_once 'config.php';
// error_reporting(0);
if ($_SERVER['REQUEST_METHOD'] == "POST"){
$month = trim($_POST['date']);
$target = trim($_POST['target']);
$sales = trim($_POST['sales']);
$sql = "INSERT INTO product_report(month, target ,sales) VALUES( '$month', '$target' , '$sales')";
$result = mysqli_query($conn, $sql);
if ($result)
{ header("location: product_report.php");
}
else{
echo"something went wrong" . mysqli_error();
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<link href="css/cutomer_data.css" type="text/css" rel="stylesheet">
<title>Report form</title>
</head>
<body>
<style>
body {
background-color: rgb(218, 217, 238);
}
</style>
<h1> Product Report Data</h1>
<form id="form" method="post">
<!-- Details -->
<div class="form-control">
<div ><br>
<label> Month</label>
<input type="month" name="date" placeholder="Enter Month" required>
</div>
<div ><br>
<label> Target Sales</label>
<input type="number" name="target" placeholder="Enter Month" required>
</div>
<div ><br>
<label> Sales</label>
<input type="number" name="sales" placeholder="Enter Month" required>
</div>
<div>
<br>
<!-- <a href="main page.html"> -->
<button type="submit">Generate</button>
</div>
</div>
</form>
</div>
</div>
</body>
</html>