PHP-Code:
<label class="left" for="empfaenger[]">Empf.:</label>
<select class="style_input" id="empfaenger[]" name="empfaenger[]" size="7" multiple>
<?php
$SQL = mysql_query("SELECT * FROM as_beobachten WHERE id_kaeufer = '".$_SESSION["ID"]."' AND first = '0'");
if(strlen($_SESSION["ID"] ) != 0)
{
if(mysql_num_rows(mysql_query("SELECT id FROM as_members WHERE id = '".$id_empfaenger."'")) > 0)
{
$EMPFAENGER = mysql_fetch_array(mysql_query("SELECT * FROM as_members WHERE id = '".$id_empfaenger."'"));
?>
<option selected=selected value="<?php echo $id_empfaenger; ?>"><?php echo $EMPFAENGER["nick"]." (".$EMPFAENGER["onlinelist"].")"; ?></option>
<?php } }
while(($FUXXLIST = mysql_fetch_array($SQL)))
{
$FUXX = mysql_fetch_array(mysql_query("SELECT * FROM as_members WHERE id = '".$FUXXLIST["id_anbieter"]."'"));
if($empfaenger_id != $FUXX["id"])
{
$SELEKTIEREN = FALSE;
foreach($_POST["empfaenger"] as $key => $value)
if($FUXX["id"] == $_POST["empfaenger"][$key])
$SELEKTIEREN = TRUE;
?>
<option<?php if($SELEKTIEREN) echo " selected=selected"; ?> label="<?php echo $FUXX["id"]; ?>" id="<?php echo $FUXX["id"]; ?>" name="<?php echo $FUXX["id"]; ?>" value="<?php echo $FUXX["id"]; ?>"><?php echo $FUXX["nick"]; ?></option>
<?php } } ?>
</select>
aber ich verstehe nicht genau, was ich angeben muss, wenn ich beim submit die postdaten überprüfen will.
Kommentar