i want to make a multi-question poll in steps. i want the questions to be displayed one after the other in sequence and the questions should be pulled from the DB.
i am successfully fetching one question from the DB. but the way i want to make it work is when the user clicks on Submit for one question it should take the user to the next question.
$query = "SELECT qid, qtitle FROM questions where qid = $qid";
$result = mysql_query($query) or die("ERROR: $query.".mysql_error());
// if records are present
if (mysql_num_rows($result) > 0) {
$row = mysql_fetch_object($result);
// get question ID and title
$qid = $row->qid;
echo '<div id=ques>';
echo '<h2>'.$row->qtitle .'</h2>';
echo '</div>';
can someone please help me with the loop and constructs for this type of query?
i dont want to make seperate pages for the questions.