THE ACTUAL ISSUE WAS I FORGOT A SEMICOLON.

This commit is contained in:
Carly Ho 2023-06-29 18:26:10 -05:00 committed by GitHub
parent f3a5a54c75
commit 5b43fe9e03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -21,8 +21,8 @@ if (array_key_exists('give', $_GET)) {
$prevkudos = $db->query("select count(*) from kudos where workid={$work} and ipaddr={$ip};");
if ($exists > 0 && $prevkudos == 0) {
$db->query("insert into kudos (workid, ipaddr) values ({$work}, {$ip});");
$content = "Thanks for leaving kudos! You can now close this window."
include "./template.php";
$content = "Thanks for leaving kudos! You can now close this window.";
require("./template.php");
}
} else if (array_key_exists('show', $_GET)) {
// We're showing the number of kudos
@ -46,7 +46,7 @@ if (array_key_exists('give', $_GET)) {
// We're showing a simple form for creating new works
$content = file_get_contents("./form.php");
include "./template.php";
require("./template.php");
} else if (array_key_exists('newwork', $_POST)) {
$work = filter_var($_POST['newwork'], FILTER_SANITIZE_STRING);
// check if the work exists already since we can't do duplicates
@ -70,7 +70,7 @@ if (array_key_exists('give', $_GET)) {
$content .= file_get_contents("./form.php");
}
include "./template.php";
require("./template.php");
}
// if we haven't closed connection yet, we're done now.