[eluser]infro[/eluser]
Hello,
trying out CI and now im trying to do very simple thing: submit some data from form and get it. But im surely not understanding something or didn't read all info on that, cause i can't get it working.
simple form:
Code:
<form action="http://localhost/codeigniter/general/change_language" method="POST">
<input type="text" name="test" value="labas" />
<input type="submit" name="submit1" value="GoGo" />
</form>
controller:
Code:
class General extends Controller {
function General() {
parent::Controller();
}
function change_language() {
var_dump($_GET);
if (isset($_GET['test']))
echo 'YES!';
if (isset($_GET['submit1']))
echo 'YES!';
var_dump($_POST);
if (isset($_POST['test']))
echo 'YES!';
if (isset($_POST['submit1']))
echo 'YES!';
print ($this->input->get_post('test'));
print ($this->input->get_post('submit1'));
print ($this->input->post('submit1'));
print ($this->input->get('submit1'));
}
}
tried every way i know to display any data. also tried using GET method. no luck. :/
anyone knows what i did wrong?