Articles → PHP CODEIGNITER → Form_Open And Form_Close In Codeigniter
Form_Open And Form_Close In Codeigniter
Purpose
- "form_open" method renders the opening form tag.
- "form_close" method renders the closing form tag.
Example
$this->load->helper('form');
<body><div id="container"><div id="body"></div></div>
<?php echo form_open(); ?>
<?php echo form_close(); ?></body>
Click to Enlarge
Passing Attribute In The "Form_Open" Method
<?php
$attributes = array(
'method' => 'get',
'id' => 'myform'
);
echo form_open('users_list', $attributes); ?><?php echo form_close(); ?>
Click to Enlarge