1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Improve code for language selection (#709)

This commit is contained in:
Kamil Tekiela
2022-09-29 10:29:51 +01:00
committed by GitHub
parent 8b776fbd72
commit 9a5e56d966
4 changed files with 29 additions and 61 deletions

2
my.php
View File

@@ -13,7 +13,7 @@ $options = [];
if (isset($_POST['my_lang'], $langs[$_POST['my_lang']])) {
// Set the language preference
myphpnet_language($_POST['my_lang']);
$MYPHPNET[0] = $_POST['my_lang'];
// Add this as first option, selected
$options[] = '<option value="' . $_POST['my_lang'] . '" selected>' .