This commit is contained in:
notfire 2025-02-27 09:00:39 -05:00
parent 916fe94815
commit b2751e3bbd
Signed by: notfire
GPG key ID: 3AFDACAAB4E56B16
2 changed files with 3 additions and 3 deletions

View file

@ -34,7 +34,6 @@ WHERE id = {$id};
$qresp = pg_query($db, $query);
$arr = pg_fetch_array($qresp);
$runOnLoad = "document.getElementById(\"passinput\").value = \"" . htmlspecialchars($arr["responsetext"]) . "\"";
$properTitle = $pageTitle . " respond to question #" . $id;
include '../boilerplate/pageStart.php';
@ -61,7 +60,8 @@ if ($arr["ispublic"] === "f") {
} else {
echo("<h3>enter a response</h3>");
}
echo("<form class=\"frm\" action=\"index.php\"><input hidden name=\"id\" value=\"{$id}\"><input hidden name=\"page\" value=\"respond\"><input hidden name=\"pw\" value=\"{$adminPassword}\"><input id=\"passinput\" name=\"text\" autofocus=\"autofocus\" required=\"\"><br><button class=\"submitbutton\" type=\"submit\">send</button></form>");
$respTxt = htmlspecialchars($arr["responsetext"]);
echo("<form class=\"frm\" action=\"index.php\"><input hidden name=\"id\" value=\"{$id}\"><input hidden name=\"page\" value=\"respond\"><input hidden name=\"pw\" value=\"{$adminPassword}\"><input id=\"passinput\" name=\"text\" value=\"{$respTxt}\" autofocus=\"autofocus\" required=\"\"><br><button class=\"submitbutton\" type=\"submit\">send</button></form>");
}
?>

View file

@ -1,5 +1,5 @@
<?php
// set up the page to have proper tags like <title>
echo("<!DOCTYPE html><html><head><title>" . $properTitle . "</title><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/></head><body onload=\"" . $runOnLoad . "\">")
echo("<!DOCTYPE html><html><head><title>" . $properTitle . "</title><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"/></head><body>")
?>