form_fieldset_close()

form_fieldset_close([$extra = '']) Parameters: $extra (string) – Anything to append after the closing tag, as is Returns: An HTML fieldset closing tag Return type: string Produces a closing </fieldset> tag. The only advantage to using this function is it permits you to pass data to it which will be added below the tag. For example $string = '</div></div>'; echo form_fieldset_close($string); // Would produce: </fieldset></div></div>

form_fieldset()

form_fieldset([$legend_text = ''[, $attributes = array()]]) Parameters: $legend_text (string) – Text to put in the <legend> tag $attributes (array) – Attributes to be set on the <fieldset> tag Returns: An HTML fieldset opening tag Return type: string Lets you generate fieldset/legend fields. Example: echo form_fieldset('Address Information'); echo "<p>fieldset content here</p>\n"; echo form_fieldset_close(); /* Produces: <fieldse

form_error()

form_error([$field = ''[, $prefix = ''[, $suffix = '']]]) Parameters: $field (string) – Field name $prefix (string) – Error opening tag $suffix (string) – Error closing tag Returns: HTML-formatted form validation error message(s) Return type: string Returns a validation error message from the Form Validation Library, associated with the specified field name. You can optionally specify opening and closing tag(s) to put around the error message. Example: // Assuming that the 'userna

form_dropdown()

form_dropdown([$name = ''[, $options = array()[, $selected = array()[, $extra = '']]]]) Parameters: $name (string) – Field name $options (array) – An associative array of options to be listed $selected (array) – List of fields to mark with the selected attribute $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML dropdown select field tag Return type: string Lets you create a standard drop-down field. The first paramete

form_close()

form_close([$extra = '']) Parameters: $extra (string) – Anything to append after the closing tag, as is Returns: An HTML form closing tag Return type: string Produces a closing </form> tag. The only advantage to using this function is it permits you to pass data to it which will be added below the tag. For example: $string = '</div></div>'; echo form_close($string); // Would produce: </form> </div></div>

form_checkbox()

form_checkbox([$data = ''[, $value = ''[, $checked = FALSE[, $extra = '']]]]) Parameters: $data (array) – Field attributes data $value (string) – Field value $checked (bool) – Whether to mark the checkbox as being checked $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML checkbox input tag Return type: string Lets you generate a checkbox field. Simple example: echo form_checkbox('newsletter', 'accept', TRUE); // Woul

form_button()

form_button([$data = ''[, $content = ''[, $extra = '']]]) Parameters: $data (string) – Button name $content (string) – Button label $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML button tag Return type: string Lets you generate a standard button element. You can minimally pass the button name and content in the first and second parameter: echo form_button('name','content'); // Would produce: <button name="name" t

force_download()

force_download([$filename = ''[, $data = ''[, $set_mime = FALSE]]]) Parameters: $filename (string) – Filename $data (mixed) – File contents $set_mime (bool) – Whether to try to send the actual MIME type Return type: void Generates server headers which force data to be downloaded to your desktop. Useful with file downloads. The first parameter is the name you want the downloaded file to be named, the second parameter is the file data. If you set the second parameter to NULL and $file

entity_decode()

entity_decode($str, $charset = NULL) Parameters: $str (string) – Input string $charset (string) – Character set Returns: String with decoded HTML entities Return type: string This function is an alias for CI_Security::entity_decode(). Fore more info, please see the Security Library documentation.

encode_php_tags()

encode_php_tags($str) Parameters: $str (string) – Input string Returns: Safely formatted string Return type: string This is a security function that converts PHP tags to entities. Note xss_clean() does this automatically, if you use it. Example: $string = encode_php_tags($string);