dimanche 1 mars 2015

Form won't forward $score to next page

When a user takes a quiz, their score is captured in the value $grade, which displays fine on the quiz's home page. But if I change the form action to forward the user to a new page (grade.php), $grade loses its value.


How can I capture the value and display it on the next page? The values for PreviousURL and user_token display...



<form action="grade.php" method="post" id="quiz">
<input type="hidden" name="PreviousURL" id="url" />
<input type="hidden" name="user_token" value="<?php echo $_SESSION['user_token']; ?>" />
<input type="submit" value="Submit Quiz" />
</form>


So I tried this, but it doesn't work...



<input type="hidden" name="grade" value="<?php echo $_SESSION['grade'] ?>" />

Aucun commentaire:

Enregistrer un commentaire