Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Instead of Form action and method

<?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.

like image 565
user1290187 Avatar asked Feb 08 '12 07:02

user1290187


People also ask

What is an action in a form?

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.))

What is <form> method in HTML?

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

What is the difference between method and action attribute?

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.

What is the use of method attribute in form?

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" ).


1 Answers

Try this:

echo form_open('controller/somepage', array('method'=>'get'));
like image 132
Touhid Avatar answered Nov 15 '22 21:11

Touhid