I use this in my controller,
function phpcalview()
{
$year = $this->input->post('yearvv');
$year1 = $year+1;
//echo $year1;
$this->load->view('phpcal',$year1);
}
How to $year1
value to my view phpcal
and 开发者_开发知识库get that value in the textbox yearvv
function phpcalview()
{
$year = $this->input->post('yearvv');
$data['year1'] = $year+1;
$this->load->view('phpcal',$data);
}
in view:
echo $year1;
If you want to "get that value in the textbox yearvv
" put this in your view:
<input type="text" name="yearvv" value="<?=$year1?>" />
精彩评论