-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelpup.php
51 lines (47 loc) · 1.6 KB
/
helpup.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
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"])){
$description = $_POST["description"];
$username = $_SESSION["username"];
$insertquery = "INSERT into helpposts VALUES(NULL,'$username','$description',current_timestamp())";
//echo $insertquery;
mysqli_query($conn,$insertquery);
}
/*Suggestion category and description needs login*/
?>
<div class="help-desk">
<h2>Create New Ticket</h2>
<form action="helpup.php" method="POST">
<div class="form-group">
<label for="description">Description:</label>
<textarea id="description" name="description" rows="5" placeholder="Enter your Problems" required=""></textarea>
</div>
<div class="form-group">
<button type="submit" name="submit">Submit</button>
</div>
</form>
</div> <hr>
<?php include("includes/footer.php"); ?>
<!-- <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form method="post" action="suggestionsup.php">
<input type="text" name="description" placeholder="Description" ><br>
<input type="submit" name="submit"><br>
</form>
</body>
</html> -->