I'm pretty new to programming and have the following problem. I have a list of 10 movie genres in a form checkbox. The user picks five of their favorite movies and hits submit. Then on the next page the user must rank the 5 movie genres that they selected from 1-5 (1 being their most favorite and 5 being the least). and echo the result in order.
I have the following code for the checkbox page:
<form id="genre" name="genre" method="post" action="picked3.php">
<input type="checkbox" name="genre[]" id="genre" value="Adventure"/>Adventure
<input type="checkbox" name="genre[]" id="genre" value="Animation"/>Animation
<input type="checkbox" name="genre[]" id="genre" value="Biography"/>Biography
<input type="checkbox" name="genre[]" id="genre" value="Classic"/>Classic
<input type="checkbox" name="genre[]" id="genre" value="Comedy"/>Comedy
<input type="checkbox" name="genre[]" id="genre" value="Crime"/>Crime
<input type="checkbox" name="genre[]" id="genre" value="Drama"/>Drama
<input type="checkbox" name="genre[]" id="genre" value="Spy"/>Spy
<input type="checkbox" name="genre[]" id="genre" value="War"/>War
<input type="checkbox" name="genre[]" id="genre" value="Western"/>Western
<input type="submit" value="Submit"></form>
but I need help making the next page with giving the user the ability to rank the genres they have selected from 1-5. I think it can be done with a session function, a for each variable loop for what was checked on the previous page and textboxes to rank from 1-5 but I'm not sure.
Aucun commentaire:
Enregistrer un commentaire