<?php echo validation_errors(); ?>
<?php echo form_open('form'); ?>
<input type="text" name="something" />
<input type="submit" value="submit"/>
</form>
I find that there is no "action" and "method" as in
<form action="/application/controler/somepage.php" method="POST">
</form>
in which I would like to get the value entered in the text box after the button submit is pressed. How can I do the same (get the value submitted via POST or GET) as in the former ?
Also, in case I would like to get the value passed in the URL
http://localhost/index.php/something?value=75&today=Wed
that is 75
and Wed
, for example.
4 Answers 4 ActiveOldestVotes 83 Action normally specifies the file/page that the form is submitted to (using the method described in the method paramater (post, get etc.))
HTML <form> method Attribute 1 Definition and Usage. The method attribute specifies how to send form-data (the form-data is sent to the page specified in the action attribute). 2 Browser Support 3 Syntax 4 Attribute Values 5 More Examples
Definition and Usage. The method attribute specifies how to send form-data (the form-data is sent to the page specified in the action attribute). The form-data can be sent as URL variables (with method="get") or as HTTP post transaction (with method="post"). Notes on GET: Appends form-data into the URL in name/value pairs.
Definition and Usage. The method attribute specifies how to send form-data (the form-data is sent to the page specified in the action attribute). The form-data can be sent as URL variables (with method="get") or as HTTP post transaction (with method="post" ).
Try this:
echo form_open('controller/somepage', array('method'=>'get'));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With