-1

我正在尝试创建一个在线测试应用程序,并在一页上使用选项调用问题。在测试结束时,我想在另一个页面上发布分数。为此,我希望所有表单数据都在另一个页面上,你有什么想法吗?

<form  name="test" method ="post" action="testfinish.php">
    <input type="submit" name="endtest" value="End Test"/>
    <?php
        $count=4;
        $que = array();
        $que = $userObj->getQue($count);
        $_SESSION['count']=$count;
        foreach($que as $q){ ?>
            <br>
            <div style = "border:2px solid;">
            <div style = "border:2px solid;"><?php echo $q['que']?></div><br>
            <ol>
                <li><input type = "radio" name = "<?php echo $q['que_id']?>" value = "<?php echo $q['a']?>" /> <?php echo $q['a']?></li>
                <li><input type = "radio" name = "<?php echo $q['que_id']?>" value = "<?php echo $q['b']?>" /> <?php echo $q['b']?></li>
                <li><input type = "radio" name = "<?php echo $q['que_id']?>" value = "<?php echo $q['c']?>" /> <?php echo $q['c']?></li>
                <li><input type = "radio" name = "<?php echo $q['que_id']?>" value = "<?php echo $q['d']?>" /> <?php echo $q['d']?></li>
            </ol></div>
    <?php } ?>
</form>
4

1 回答 1

1

使用$_REQUEST

testfinish.php,只需使用

<?php
$result = $_REQUEST;
echo '<pre>';
print_r($result); // posted values printed as array 
echo '</pre>';

您将在此处$_REQUEST的 更多信息中找到按钮的名称

于 2012-07-06T06:33:04.693 回答