-
Notifications
You must be signed in to change notification settings - Fork 0
/
support.php
38 lines (28 loc) · 966 Bytes
/
support.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
<?php
// Include the database configuration file
session_start();
require_once 'db_connect.php';
// If file upload form is submitted
$status = $statusMsg = '';
if(isset($_POST["submit"])){
$status = 'error';
// Get file info
$mess=$_POST['mess'];
$email=$_POST['email'];
$subject=$_POST['subject'];
$name=$_POST['name'];
$user=$_POST['user'];
// Insert image content into database
$maid = $_GET['usid'];
$insert = $conn->query("INSERT INTO mess (mess, email, subject,user_id, name) VALUES ('$mess','$email','$subject','$user','$name')");
if($insert){
$status = 'success';
$statusMsg = "File uploaded successfully.";
}else{
$statusMsg = "File upload failed, please try again.";
}
}
?>
<script>
window.location.replace("thanks.php");
</script>