summary refs log tree commit diff stats
path: root/comic.php
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-01-08 21:09:05 +0000
committerStar Rauchenberger <fefferburbia@gmail.com>2024-01-08 21:09:05 +0000
commit459e929311d8806f604c0b914ba4b37aa731fbfc (patch)
treed81247d7ee4f768c9df552df07aad6d6896047f8 /comic.php
parent5b892eafafb1f41bab1a20f1524cef144042e3e1 (diff)
downloadpillowcase-master.tar.gz
pillowcase-master.tar.bz2
pillowcase-master.zip
Migrated to mysqli HEAD master
Diffstat (limited to 'comic.php')
-rwxr-xr-xcomic.php13
1 files changed, 8 insertions, 5 deletions
diff --git a/comic.php b/comic.php index 1e94abc..e8333bb 100755 --- a/comic.php +++ b/comic.php
@@ -8,11 +8,14 @@ if (!isset($_GET['id']))
8 exit; 8 exit;
9} 9}
10 10
11$getcomic = "SELECT * FROM comics WHERE filename = \"" . mysqli_real_escape_string($mysql_conn, $_GET['id']) . ".png\""; 11$getcomic = $mysql_conn->prepare("SELECT * FROM comics WHERE filename = ?");
12$getcomic2 = mysql_query($getcomic); 12$real_filename = $_GET['id'] . ".png";
13$getcomic3 = mysql_fetch_array($getcomic2); 13$getcomic->bind_param("s", $real_filename);
14 14$getcomic->execute();
15if ($getcomic3['filename'] != ($_GET['id'] . '.png')) 15$getcomic2 = $getcomic->get_result();
16$getcomic3 = $getcomic2->fetch_assoc();
17
18if ($getcomic3['filename'] != $real_filename)
16{ 19{
17 header('Location: /'); 20 header('Location: /');
18 exit; 21 exit;