-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsuggestionsup.php
73 lines (60 loc) · 2.21 KB
/
suggestionsup.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
<?php
//session_start();
include("includes/header.php");
?>
<link rel="stylesheet" href="css/help_panel.css">
<?php
include("includes/nav.php");
include("includes/db.php");
if(!isset($_SESSION["username"])){
header("Location: login.php?location=".urlencode($_SERVER['REQUEST_URI']));
}
if(isset($_POST["submit"])){
$field = $_POST["field"];
$description = $_POST["description"];
$username = $_SESSION["username"];
$insertquery = "INSERT into suggestions VALUES(NULL,'$username','$field','$description',current_timestamp())";
//echo $insertquery;
mysqli_query($conn,$insertquery);
}
/*Suggestion category and description needs login*/
?>
<h2>Your Suggestions Here</h2>
<form action="#" method="POST">
<div class="help-desk">
<div class="help-desk-title">
<label for="field">Category:</label>
<select id="field" name="field">
<option value="education">Education</option>
<option value="health">Health</option>
<option value="environment">Environment</option>
<!-- Add more options as needed -->
</select>
</div>
<div class="form-group">
<h2>Add Suggestion</h2>
<label for="description">Description:</label>
<textarea id="description" name="description" rows="5" placeholder="Enter your Suggestions" required></textarea>
</div>
<div class="form-group">
<button type="submit" name="submit">Submit</button>
</div>
</form>
</div>
</div>
<hr>
<?php include("includes/footer.php"); ?>
<!--
<form method="post" action="suggestionsup.php">
<label for="field">Choose a field:</label>
<select name="field" id="field">
<option value="education">Education</option>
<option value="construction">Public Construction</option>
<option value="tourism">Tourism and heritage</option>
<option value="tax">Tax</option>
</select>
<input type="text" name="description" placeholder="Description" ><br>
<input type="submit" name="submit"><br>
</form>
</body>
</html> -->