POST Multiple Values from single Option

royalaxia

New Member
The last step of the PHP/MySQL project that I have been working long and hard on comes down to allowing a teacher to see the results of every test take by students. When it came to the students seeing their own results - this was simple, it of course used their SessionID and the post value of the test that they had selected.Now - when the teacher goes in I can continue to use the same method for the QuizID that we want to pull back... but the UserID remains a bit of a mystery to me. In this code:\[code\]$sql = "SELECT Complete.UserName, Complete.UserID, Complete.QuizID, Quiz.QuizName FROM Complete INNER JOIN Quiz ON Complete.QuizID=Quiz.QuizID"; $result = mysql_query($sql); while($row = mysql_fetch_array($result)) { echo "<option value=http://stackoverflow.com/"".$row['QuizID']."\">".$row['QuizName']." - ".$row['UserName']."</option>\n "; } if (!mysql_query($sql,$con)){ die('Error: ' . mysql_error());}\[/code\]Is there a way to make it so not only the QuizID is passed in, but also the UserID? I experimented with a few ideas I saw on here and elsewhere but with no such luck.
 
Back
Top