php poll loop query
<p>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.</p>

<p>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. </p>

<pre><code>$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) &gt; 0) {
$row = mysql_fetch_object($result);

// get question ID and title
$qid = $row-&gt;qid;
    echo '&lt;div id=ques&gt;';
echo '&lt;h2&gt;'.$row-&gt;qtitle .'&lt;/h2&gt;';
    echo '&lt;/div&gt;';
</code></pre>

<p>can someone please help me with the loop and constructs for this type of query?</p>

<p>i dont want to make seperate pages for the questions.</p>
