亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Thinkphp has some issues about passing parameters to view
給我你的懷抱
給我你的懷抱 2017-07-05 09:56:02
0
2
989

Click on the a tag to transmit the parameter id to the controller. The controller queries the record value of the id row from the data table and displays it in the view through assign. However, when clicking on different links, the first row of records in the data table is displayed. Is there something wrong with the writing on the controller side?

<a href="{:U('MemberList/update?username=')}{$v.username}">編輯</a> 
public function update($username)
{
    //默認(rèn)顯示添加表單
    if (!IS_POST) {
        $model = M('register')->find(I('$username'));;
        $this->assign('model',$model);
        $this->display();
    }
    //…………
}
<form action="{:U('MemberList/update?username=')}{$model.username}" method="post">
    <p class="form-group">
        <label>學(xué)員名稱</label>
        <input class="form-control" type="text" name="username" value="{$model.username}">
    </p>
<form>
給我你的懷抱
給我你的懷抱

reply all(2)
洪濤

{:U('MemberList/update',array('username'=>$v['username']))}

伊謝爾倫

The correct answer on the first floor, read more documents to get the truth

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template