-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsave.php
More file actions
28 lines (26 loc) · 820 Bytes
/
save.php
File metadata and controls
28 lines (26 loc) · 820 Bytes
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
<?php
$servername = "localhost";
$username = "id2637636_root";
$password = "giggle";
$dbname = "id2637636_doorstep";
$comp_id=$name=$complaint=$address=$email=$phone=$board='';
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$comp_id= $_POST["comp_id"];
$reply= $_POST["reply"];
$name= $_POST["name"];
$sql = "insert into track values ('$comp_id','$reply','$name')";
if ($conn->query($sql) === TRUE) {
// echo "New complaint recorded successfully";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
?>
<!-- <a href="gov.php" isclicked>link text</a> -->
<script type="text/javascript">
window.location.href = "gov.php";
</script>