<FORM method="post" enctype="multipart/form-data" class="form" action="{:url('bbox/submitbbox',array('imgid'=>$img.id))}"><!--此处是跳转位置-->
Image Labels:{$img.label}<br/>
Labels:<br/>
<table border="1" width="500px">
{for start="0" end="$img.lab_num"}
<tr><td>{$labels[$i]}</td><td>(x,y)(x,y)</td><td><input class="input_box" type="text" id="cordi{$i}" name="cordi{$i}" onclick="getValue(this.id)"/></td></tr>
{/for}
</table>
<br/>
<!--END:choose label-->
<br/>
<INPUT type="submit" class="btn" value="Submit">
</FORM>
// 文件上传提交
public function submitbbox()
{
$save_string = '';
$bbox = input('post.');
$imgid = input('imgid');
foreach($bbox as $key=>$value)
{
$save_string = $save_string.$key.":".$value.".";
}
$res = db('forlab')->update(['bbox' => $save_string,'id'=>$imgid]);
if($res){
$this->success('successful!!!',url('index'));//此处是成功跳转界面
}else{
$this->error('failed!!!');
}
//$text = $_POST['text'];
}