We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,134 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

this is the code

<?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>";
?>
4
Contributors
3
Replies
2 Hours
Discussion Span
1 Year Ago
Last Updated
4
Views
cskinittest
Newbie Poster
8 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

What do you need from this code?

Karthik_pranas
Posting Pro
571 posts since Feb 2011
Reputation Points: 96
Solved Threads: 101
Skill Endorsements: 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/

phper
Posting Whiz in Training
213 posts since Nov 2006
Reputation Points: 22
Solved Threads: 19
Skill Endorsements: 0

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

baig772
Junior Poster
155 posts since Mar 2011
Reputation Points: 29
Solved Threads: 10
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0693 seconds using 2.79MB