-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditcommentsave.php
More file actions
27 lines (20 loc) · 850 Bytes
/
editcommentsave.php
File metadata and controls
27 lines (20 loc) · 850 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
<?php
header("Content-type: text/html; charset=utf-8");
session_start();
require_once "service/service.php";
if($_SESSION[MEMBER]['LOGIN'] != 'ON'){
@header('location: /index.php');
exit;
}
if ($_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'])) {
$sql="
UPDATE comment SET msg = '".$_POST['msg']."', date_update = NOW()
WHERE code = '".$_POST['id']."'
";
$query=mysql_query($sql) or die(mysql_error());
echo '<script language="javascript">window.location.replace("comment.php?matchID='.$_POST['matchID'].'");</script>';
}else{
echo '<script language="javascript">alert("กรุณาตรวจสอบ CODE 4 หลัก ");</script>';
echo '<script language="javascript">window.location.replace("editComment.php?id='.$_POST['id'].'&matchID='.$_POST['matchID'].'");</script>';
}
?>