john
john

Reputation: 57

not work php button to perform the action

I've started to use the car dealer script. Unfortunately, this script is not possible to change the language of the visitor's side. Therefore, the first picture of the dropdown menu code, where you can choose between English and German, I copy from administrator panel. When you change the language from English to German and refresh the page, then I again left the English language.

first picture

In the second picture shows that this time I will present copied the update button, from administrator panel, this time changing the language and press the update button, nothing happens, the language does not change, when I refresh the page, then remains the same English.

second picture

Language changes only through the administrator panel. What should I do for the visitor himself could change the page language?

this is a drop down menu code, which I browser from admin panel to header file

<div class="field">
    <select name="lang">
      <?php foreach(Lang::fetchLanguage() as $lang):?>
      <option value="<?php echo $lang->abbr;?>"<?php if($core->lang == $lang->abbr) echo ' selected="selected"';?>><?php echo $lang->name;?></option>
      <?php endforeach;?>
    </select>
</div>

this is an update button code

<button type="button" name="dosubmit" class="wojo positive button">
    <?php echo Lang::$word->CONF_UPDATE;?>
</button>
<input name="processConfig" type="hidden" value="1" />

In my controller.php I found this code

/* == Proccess Configuration == */
if (isset($_POST['processConfig'])):
    $core->processConfig();
endif;

what should I do to make this feature work, the visitor could itself change the language?

if you need any more info, feel free to ask me, because I'm really new to this world.

Sorry for my English, English language use with google translate

Upvotes: 4

Views: 115

Answers (1)

hywak
hywak

Reputation: 900

You have to use button type submit, you have button type.

<button type="button" name="dosubmit" class="wojo positive button">

<button type="submit" name="dosubmit" class="wojo positive button">Value</button>

Upvotes: 1

Related Questions