这是表格:
<?php echo form_open('locker_settingstwo/processform', array('class' => 'form-horizontal')); ?>
<div class = "lockersettingstwodiv">
<h2><?php echo $this->session->userdata('labelname'); ?></h2>
<p> Control who can view/ReGemz the collection in this locker </p>
<input type = "text" name = "testing" value = "" />
<input type="radio" name="permission" value="1" /> Public - Others can view/edit this locker<br/>
<input type="radio" name="permission" value="2" /> Me Only - Only you can view/edit this locker<br/>
<input type="radio" name="permission" value="custom" /> Custom - Locked to everyone, meaning only friends I choose can view/edit this locker<br/>
</div>
<input type="submit" name = "Next" value="Next" class="btn btn-large btn-primary" style="margin-left: 0px; margin-top: 14px" />
<input type="submit" name = "Cancel" value="Cancel" class="btn btn-large btn-primary" style="margin-left: 0px; margin-top: 14px" />
<?php echo form_close(); ?>
现在当我打印 $_SERVER['REQUEST_METHOD'] 时,它说的是 GET,而不是 POST……这是为什么呢?
这是表单发送到的控制器方法:
function processform()
{
echo $_SERVER['REQUEST_METHOD'];
}