-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgameeditprocess.php
More file actions
38 lines (32 loc) · 1.08 KB
/
gameeditprocess.php
File metadata and controls
38 lines (32 loc) · 1.08 KB
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
<!-- SQL Connect -->
<?php $sqlpath = $_SERVER['DOCUMENT_ROOT'];
$sqlpath .= "/sql-connect.php";
include_once($sqlpath); ?>
<!-- Header -->
<?php
$headpath = $_SERVER['DOCUMENT_ROOT'];
$headpath .= "/header.php";
include_once($headpath);
// Create variables
$id=$_POST['id'];
$uid=$_POST['uid'];
$gallerytemp=$_POST['gallery'];
$playlisttemp=$_POST['playlist'];
$sentimenttemp=$_POST['sentiment'];
$review=trim(addslashes($_POST['review']));
$gallery=htmlentities(trim(addslashes($gallerytemp)));
$playlist=htmlentities(trim(addslashes($playlisttemp)));
$sentiment=htmlentities(trim(addslashes($sentimenttemp)));
$sql = "UPDATE games
SET gallery = '$gallery', playlist = '$playlist', review = '$review'
WHERE uid LIKE '$uid';";
if ($dbcon->query($sql) === TRUE) {
echo ('<script type="text/javascript">location.href = "game.php?id='.$uid.'";</script>');
//header('game.php?id='.$uid);
//include('game.php?id='.$uid);
}
else {
echo "Error: " . $sql . "<br>" . $dbcon->error;
}
//Footer
?>