Welcome Guest, Not a member yet? Register   Sign In
getting post variables from the form helper

hi all --

I'm using the form helper to make a form (of course) -- it should load the page again with the selected variable changed, i.e. language selection -- english, french, etc.

but for some reason I can't get the selected variable. it's a drop down list and the code looks like this:


switch ($lant)
case "en": $this->lang->load('mustica', 'english');

case "fr": $this->lang->load('mustica', 'french');


echo form_open('index_gauche/menn');
$options = array(
'en' => $this->lang->line('menu_en'),
'fr' => $this->lang->line('menu_fr'),
$js = 'onChange="submit()"';

echo form_dropdown('lant', $options, 'en', $js);

echo form_close();

I try to read the "lant" variable several ways, namely $_POST, but get nothing. any clues?

[eluser]Phil Sturgeon[/eluser]
Have you attempted using the correct method:


Please when posting code, use the correct BB tags to make it easier for everyone.

Theme © iAndrew 2016 - Forum software by © MyBB