1,105,229 Community Members

this is the code

Member Avatar
cskinittest
Newbie Poster
8 posts since Oct 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 
<?php
        session_start(); 
    if(isset($_POST['next'])){
        $a=$_POST['a'];
    }
    if(!isset($a)){
        $a=0;
    }
        $q = $_SESSION['q']['a'];
    include('dbconfiguration.php');
    $sql1="SELECT * FROM question WHERE question_id='1' LIMIT 1 OFFSET 0 $q";
    $result=mysql_query($sql1);
        echo $sql1;
    echo "<form method='post' action=''>";
    while ($row = mysql_fetch_array($result))
    {
        echo $row['Question']. "<br/>";
        echo "<input type='radio' value='answer1' name='answer'>" .$row['optionone'];
        echo "<input type='radio' value='answer1' name='answer'>" .$row['optiontwo'];
        echo "<input type='radio' value='answer1' name='answer'>" .$row['optionthree'];
        echo "<input type='radio' value='answer1' name='answer'>" .$row['optionfour']. "<br/>";
    }
    $a=$a+1;
    echo "<input type='hidden' value='$a' name='a'>";
            echo "<input type='submit' name='previous' value='previous'> ";
    echo "<input type='submit' name='next' value='next'> ";
    echo "<input type='reset' name='reset' value='Reset'>";
            echo "<input type='submit' name='submit' value='summary'>";
    echo "</form>";
?>
Member Avatar
karthik_ppts
Posting Pro
574 posts since Feb 2011
Reputation Points: 81 [?]
Q&As Helped to Solve: 101 [?]
Skill Endorsements: 1 [?]
 
0
 

What do you need from this code?

Member Avatar
phper
Posting Whiz in Training
209 posts since Nov 2006
Reputation Points: 9 [?]
Q&As Helped to Solve: 19 [?]
Skill Endorsements: 0 [?]
 
0
 

What's the problem with the code? Please don't use this site to host code snippets if there's no question you have - use http://snipplr.com/

Member Avatar
baig772
Junior Poster
165 posts since Mar 2011
Reputation Points: 19 [?]
Q&As Helped to Solve: 11 [?]
Skill Endorsements: 0 [?]
 
0
 

wow it looks great,
where i should use it?? :)

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article