@@ -10,6 +10,8 @@ mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
# investigate if we can put multiple input boxes and loop through them to insert into the database
# https://stackoverflow.com/questions/34469482/how-to-insert-multiple-inputs-into-the-database-using-the-power-of-php
unset($_SESSION['title']);
if (isset($_SESSION['tid'])) {
$_POST['tid'] = $_SESSION['tid'];
}
@@ -47,7 +49,7 @@ echo '<tr><td><input type="text" name="titlerankname" required autofocus></td><t
echo '</table><br /><input type="hidden" name="title" value="titleranksubmit"><input type="hidden" name="titlenameid" value="' . $_POST['tid'] . '"><input type="submit" value="Add title rank ..."></form>';
echo 'Here are the currently associated title ranks, starting with rank 1:<br />';
echo '<table border="1"><tr><th>stnameid</th><th>titlenameid</th><th>stname</th><th>stpoints</th><th>strank</th></tr>';
echo '<form action="titlemanager.php" method="post">< table border="1"><tr><th>stnameid</th><th>titlenameid</th><th>stname</th><th>stpoints</th><th>strank</th><th>Edit </th></tr>';
$stmtview = $con->prepare("SELECT * FROM gwsubtitles WHERE titlenameid = ? ORDER BY strank ASC");
$stmtview->bind_param("i", $_POST['tid']);
$stmtview->execute();
@@ -58,9 +60,9 @@ while ($row = $result->fetch_assoc()) {
$stname = $row['stname'];
$stpoints = $row['stpoints'];
$strank = $row['strank'];
echo '<tr><td>' . $stnid . '<td>' . $tnid . '</td><td>' . $stname . '</td><td>' . number_format($stpoints) . '</td><td>' . $strank . '</td></tr>';
echo '<tr><td>' . $stnid . '<td>' . $tnid . '</td><td>' . $stname . '</td><td>' . number_format($stpoints) . '</td><td>' . $strank . '</td><td><input type="checkbox" name="editstitle[]" value="' . $stnid . '"></td>< /tr>';
}
$stmtview->close();
echo '</table><br />If anything looks off, please fix it!<br /><br />';
echo 'Return to <a href="titlemanager.php" class="navlink">title manager</a>'; //this line needs to go away soon. Maybe?
echo '</table><br /><input type="hidden" name="title" value="modsubtitle"><input type="submit" value="Edit selected titles"></form><br /> If anything looks off, please fix it!<br /><br />';
echo 'Return to <a href="titlemanager.php" class="navlink">title manager</a>';
?>