diff --git a/includes/titleranks-editor.php b/includes/titleranks-editor.php index 1bad404..14d793f 100644 --- a/includes/titleranks-editor.php +++ b/includes/titleranks-editor.php @@ -6,40 +6,23 @@ error_reporting(E_ALL); mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); # delete the above when shit finally works -$tid = $_SESSION['tid']; -echo 'the session tid number is: ' . $_SESSION['tid'] . '
'; +# $tid = $_SESSION['tid'] = titlenameid from database +# $stid = $_POST['editstitle'] = stnameid from database and it should return an array of numbers -$stid = array(); -foreach ($_POST['editstitle'] as $tredit) { - $stid[] = (int)$tredit; -} -$stid = implode(',', $stid); -echo 'the value of stid is now: ' . $stid . '
'; -$sredit = $con->prepare("SELECT * FROM gwsubtitles WHERE titlenameid = ? AND stnameid IN (?)"); -$sredit->bind_param("is", $tid, $stid); -$sredit->execute(); -$sredit->store_result(); -$sredit->bind_result($gwtid, $gwstid); -while ($sredit->fetch()) { - echo 'farts
'; -} -$sredit->free_result(); -$sredit->close(); +echo '
'; //save this line!!! -// keep this section -/* if (isset($_POST['editstitle'])) { - $sredit = $con->prepare("SELECT * FROM gwsubtitles WHERE stnameid = ? AND titlenameid = ?"); - foreach ($_POST['editstitle'] as $tredit) { - $sredit->bind_param("ii", $tid, $tredit); - $sredit->execute(); - $sredit->store_result(); - $sredit->bindresult( - echo 'the value is: ' . $tredit . '
'; - } -} else { - echo 'nothing is set??
'; +$ph = implode(",", $_POST['editstitle']); + +$sredit = $con->prepare("SELECT * FROM gwsubtitles WHERE titlenameid = ? AND stnameid IN ($ph)"); +$sredit->bind_param("i", $_SESSION['tid']); +$sredit->execute(); +$result = $sredit->get_result(); +while ($row = $result->fetch_assoc()) { + echo ''; + echo ''; + echo ''; } -*/ -echo '
code to mod title ranks via an include goes here

'; +echo '
stnameidtitlenameidstnamestpointsstrank

'; +echo '

'; echo 'Return to title manager'; ?> \ No newline at end of file diff --git a/includes/titleranks-update.php b/includes/titleranks-update.php new file mode 100644 index 0000000..00eb256 --- /dev/null +++ b/includes/titleranks-update.php @@ -0,0 +1,6 @@ +'; +echo 'delete the specified title rank(s), but require a verification page!

'; + +echo 'Return to title manager'; +?> \ No newline at end of file