diff --git a/includes/titleranks-add.php b/includes/titleranks-add.php index 324f7d8..ec4c1a9 100644 --- a/includes/titleranks-add.php +++ b/includes/titleranks-add.php @@ -14,6 +14,12 @@ if (isset($_SESSION['tid'])) { $_POST['tid'] = $_SESSION['tid']; } +if (isset($_SESSION['tr'])) { + $_POST['titlerank'] = $_SESSION['tr'] + 1; +} else { + $_POST['titlerank'] = 0; +} + $stmtname = $con->prepare("SELECT titlename, titlemaxrank FROM gwtitles WHERE titlenameid = ?"); $stmtname->bind_param("i", $_POST['tid']); $stmtname->execute(); @@ -26,7 +32,7 @@ $stmtname->free_result(); $stmtname->close(); echo '
'; -echo ''; echo '
Title Rank NameTitle PointsRank Level
'; +echo '

'; echo 'Here are the currently associated title ranks, starting with rank 1:
'; diff --git a/includes/titleranks-submit.php b/includes/titleranks-submit.php index 7e4db9c..c45daf5 100644 --- a/includes/titleranks-submit.php +++ b/includes/titleranks-submit.php @@ -8,6 +8,7 @@ $stmtstins->execute(); $stmtstins->close(); $_SESSION['title'] = "repeat"; $_SESSION['tid'] = $_POST['titlenameid']; +$_SESSION['tr'] = $_POST['titlerank']; echo 'Title rank added, redirecting!'; header ("Refresh:1; url=titlemanager.php"); ?> \ No newline at end of file