Hi!
I have little problem.
I have a script:
How to do that in a database to save the name you chose and not his ID?
I have little problem.
I have a script:
PHP:
<span >Choose a character: </span>
<form action='?' method='POST'>
<select name='postac'> <option value='0'>(Choose character)</option>";
$players_choose = $SQL->query("SELECT `players`.`name`, `players`.`id` FROM `players` WHERE `players`.`account_id` = ".(int) $account_logged->getId())->fetchAll();
foreach($players_choose as $player)
{
$main_content .= '<option value="'.$player['id'].'"';
if($player['id'] == $char_id)
$main_content .= ' selected="selected"';
$main_content .= '>'.$player['name'].'</option>';
}
</select>