-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit.php
More file actions
25 lines (19 loc) · 858 Bytes
/
Copy pathedit.php
File metadata and controls
25 lines (19 loc) · 858 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
<?php
include"header.php";
$id = $_POST["id"];
$name = $conn -> real_escape_string($_POST["name"]);
$desc_short = $conn -> real_escape_string($_POST["desc_short"]);
$desc_full = $conn -> real_escape_string($_POST["desc_full"]);
$link = $_POST["link"];
$time_arr = $conn -> real_escape_string($_POST["years"]);
$action_arr = $conn -> real_escape_string($_POST["actions"]);
$map_loc = $conn -> real_escape_string($_POST["map_loc"]);
$sql = "UPDATE main SET name='$name', desc_short='$desc_short', desc_full='$desc_full', link='$link', map_loc='$map_loc', date_arr='$time_arr', action_arr='$action_arr' WHERE id='$id'";
if ($conn->query($sql) === TRUE) {
echo "Deleted successfully.";
} else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
$conn->close();
?>
<meta http-equiv="Refresh" content="0; url='/article.php?id=<?php echo "$id" ?>'" />