I'm having trouble receiving multiple choices and inserting into MySQL
I created this script sequence but
<form method="post" action="01maxtestes.php">
<select name="padroes" size="10" multiple>
<?
do
{
?>
<option value="<? echo $MAXI_pad_select['PAD_ID']; ?>"><? echo $MAXI_pad_select['PAD_NUM_CERTIFICADO']; ?> - <? echo $MAXI_pad_select['PAD_IDENTI']; ?> - <? if($MAXI_pad_select['PAD_STATUS_VALIDA'] == 0){ echo "<strong>(VALIDO) </strong>"; }elseif($MAXI_pad_select['PAD_STATUS_VALIDA'] == 1){ echo "(HÁ VENCER)"; }else{ echo "(VENCIDO)"; } ?></option>
<? }while($MAXI_pad_select = mysql_fetch_assoc($MAXI_pad_select_query));
?>
</select>
<br /><br />
<input type="submit" value="Enviar" />
<input type="reset" value="Cancelar" />
</form>
Then when you send it it receives only a number through it
$padroes_testesss = $_POST['padroes'];
But if I select more than one it only returns the last selected information. only I want it to return 1 or more selected information in the list by linking to an Insert Into from another table.
Can anyone give me strength?
I'm using PHP 5.4.