Update index.php

Always show player skin as selected option
This commit is contained in:
Dawid Bepierszcz
2023-11-14 15:15:01 +01:00
committed by GitHub
parent b4f8bdbf54
commit 741d602beb

View File

@@ -77,8 +77,11 @@ else
<option>Select skin</option> <option>Select skin</option>
<?php <?php
$list = $db->select("SELECT * FROM wp_weapons_paints WHERE weapon_defindex = \"{$key["weapon_defindex"]}\""); $list = $db->select("SELECT * FROM wp_weapons_paints WHERE weapon_defindex = \"{$key["weapon_defindex"]}\"");
foreach($list as $list){ foreach ($list as $list) {
echo "<option value=\"{$list['weapon_defindex']}-{$list['paint']}\">{$list['paint_name']}</option>"; if ($list['paint_name'] == $query3[0]["paint_name"])
echo "<option selected value=\"{$list['weapon_defindex']}-{$list['paint']}\">{$list['paint_name']}</option>";
else
echo "<option value=\"{$list['weapon_defindex']}-{$list['paint']}\">{$list['paint_name']}</option>";
} }
?> ?>
</select> </select>
@@ -92,4 +95,4 @@ else
</body> </body>
</html> </html>