php - Language selection working locally but not on server -


i'm building multilingual website starting 2 languages - portuguese , english - , works on local server not on actual server.

on website have 2 buttons, 1 each language, this: enter image description here

the code buttons follows:

<form action="{{ url::route('language-chooser')  }}" method="post">     <input id="locale_pt" type="submit" name="locale" class="<?php echo lang::locale() == 'pt' ? 'active' : ''  ?>" value="pt"/>     <span>|</span>     <input id="locale_en" type="submit" name="locale" class="<?php echo lang::locale() == 'en' ? 'active' : ''  ?>" value="en"/> </form> 

then have controller looks this:

class languagecontroller extends basecontroller {     public function chooser() {          session::set('locale', input::get('locale'));         return redirect::back();      } } 

and route looks like:

route::post('/language', array(     'before' => 'csrf',     'as' => 'language-chooser',     'uses' => 'languagecontroller@chooser' )); 

now problem is, title says, works fine on local server when upload actual online server buttons stop working. click them, page reloads, or seems, language site doesnt change. doesnt throw errors or me diagnose problem, don't know else do.

can point me in right direction?

thank you.

edit: ------------------------------------------------

the server using php 5.4 .

i did

if (isset($_cookie["phpsessid"])) { echo "active"; } else { echo "don't see one"; } 

and echoes "active" guess session working. right?

and if <?php echo lang::locale() ?> value of last button clicked language still doesnt change.

edit: -----------------------------------------------

problem solved. case sensitive situation. thank tried help.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -