>I have a SET field in MYSQL.
'1. Type One','2. Type Two','3. Type Three'
The user can multi-select
<select name="DPRtype[]" multiple>
<option value="1. Type One">
<option value="2. Type Two">
<option value="3. Type Three">
</select>
I just dont know how to express $_POST[DPRtype] to be able to build
the $SQL to express the separate possibilities.
$sql = "UPDATE `taylorjo`.`CRTP_CGA`
SET
`DPRtype` = '$_POST[DPRtype]'
";
PHP created rtrim, but did not make something like this? Ouf, I feel
like I just smashed a fly with a nuke.
function express_value_select($tofilter) {
$start = 0;
$ToFilterSQL ="";
foreach($tofilter as $row){
$ToFilterSQL .= $row. ",";
$start++;
}
if ($start > 0)
$ToFilterSQL = rtrim($ToFilterSQL, ",");
#echo $ToFilterSQL;
return $ToFilterSQL;
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php