I want to insert the contents of the combobox into the database via POST, but I can not.
Here is the snippet of the combobox, which pulls the data from a table
<select name="cmbtimes">
<?php
//pegando os dados
while($dados = mysql_fetch_array($query))
{
//mostrando eles (dados) em forma de options
?>
<option value="<?$dados['id'] ?>">
<?= $dados['time'] ?>
</option>
<?php
}
?>
And then it goes to the recorder.php page: (the namej is a form text field)
$nomej=$_POST['nomej'];
$cmbtimes=$_POST['cmbtimes'];
$sql = mysql_query("INSERT INTO jogador(nomej, nometime) VALUES('$nomej', '$cmbtimes')");
But it will not):