form_submit()

form_submit([$data = ''[, $value = ''[, $extra = '']]])

Parameters:
  • $data (string) – Button name
  • $value (string) – Button value
  • $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string
Returns:

An HTML input submit tag

Return type:

string

Lets you generate a standard submit button. Simple example:

echo form_submit('mysubmit', 'Submit Post!');
// Would produce:  <input type="submit" name="mysubmit" value="Submit Post!" />

Similar to other functions, you can submit an associative array in the first parameter if you prefer to set your own attributes. The third parameter lets you add extra data to your form, like JavaScript.

doc_CodeIgniter
2016-10-15 16:32:21
Comments
Leave a Comment

Please login to continue.