code

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
<?php
require_once($_SERVER['DOCUMENT_ROOT']."/top.php");
?>

<?php
$sql = "update bbs set subject='$subject', content='$content' where doc_idx=$doc_idx";
$query_result = $mysqli->query($sql);

if(!$query_result)
{
$_SESSION['modify_status'] = 'n';
}
else
{
$_SESSION['modify_status'] = 'y';
}

$mysqli->close();

header("Location: ".$url['root'].'modify_done.php');
exit();
?>

<?php
include_once($_SERVER['DOCUMENT_ROOT']."/footer.php");
?>