在我必须从cakephp中的数据库中检索数据之前编辑配置文件

时间:2015-05-22 08:14:26

标签: php cakephp cakephp-2.5

<table>
    <tr> 
    <?php echo $this->Form->input('firstname',array('type' => 'text','value'=>$firstname));?>
    </tr>
    <tr>
        <?php echo $this->Form->input('lastname',array('type' => 'text','value' => $lastname)); ?>
    </tr>
    <tr> 
    <?php echo $this->Form->input('username',array('type' => 'text','value'=>$username));?>
    </tr>
    <tr>
        <?php echo $this->Form->input('gender',array('type' => 'select','value' => $gender)); ?>
    </tr>
    <tr> 
    <?php echo $this->Form->input('email',array('type' => 'text','value'=>$email));?>
    </tr>
    <tr>
        <?php echo $this->Form->input('dateofbirth',array('type' => 'date','dateFormat' => 'YMD','value' => $dateofbirth)); ?>
    </tr>
    <tr>
        <?php echo $this->Form->input('Mobile',array('type' => 'text','value' => $mobile)); ?>
    </tr>
    <tr>
        <?php  echo $this->Form->end('Save'); ?>
    </tr>

</table>

我检索了所有数据并放入文本框,但我不知道如何选择单选按钮

echo $this->Form->input('gender',array('type' => 'select','value' => $gender)); ?>

还有一个下拉框

echo $this->Form->input('dateofbirth',array('type' => 'date','dateFormat' => 'YMD','value' => $dateofbirth)); ?>

请帮助这两件事。我正在使用Cakephp 2.5.4版本。

0 个答案:

没有答案