Professional CodeIgniter, Thomas Myer
Chapter 8: Last-Minute Upgrades
247
$data = array(`name'=
>
'description','id'=
>
'desc', `size'=
>
40, `value' =
>
$page[`description']);
echo form_input($data) ."
<
/p
>
";
echo "
<
p
>
<
label for='fpath'
>
Path/FURL
<
/label
>
<
br/
>
";
$data = array(`name'=
>
'path','id'=
>
'fpath', `size'=
>
50, `value' =
>
$page[`path']);
echo form_input($data) ."
<
/p
>
";
echo "
<
p
>
<
label for='long'
>
Content
<
/label
>
<
br/
>
";
$data = array(`name'=
>
'content','id'=
>
'long', `rows'=
>
5, `cols'=
>
'40', `value' =
>
$page[`content']);
echo form_textarea($data) ."
<
/p
>
";
echo "
<
p
>
<
label for='status'
>
Status
<
/label
>
<
br/
>
";
$options = array(`active' =
>
`active', `inactive' =
>
`inactive');
echo form_dropdown(`status',$options,$page[`status']) ."
<
/p
>
";
echo form_hidden(`id',$page[`id']);
echo form_submit(`submit','update page');
echo form_close();
?
>
When you ' re done, your admin_pages_edit view should look like Figure 8 - 3 .
Figure 8 - 3
c08.indd 247
c08.indd 247
6/10/08 5:37:28 PM
6/10/08 5:37:28 PM