Marko: Werte zusammenfassen

Beitrag lesen

Hi,

hier die Lösung...

<?php
  if ($submit) {
    $anzahl = count($softwareID);
    $text=$softwareID[0];
    for ($x=1;$x<$anzahl;$x++) {
      $text.="|$softwareID[$x]";
    }
    echo $text;
  }
  else {
?>
<form method="post" action="test.php">
<input type="hidden" name="add" value="1">
<table align="center" border="0"  cellpadding="2" cellspacing="0" width="40%">
<tr><td><b>programm</b></td><td nowrap><select name="softwareID[]" size="5" multiple>
<option value="1">Adobe Acrobat</option>
<option value="2">Adobe Illustrator</option>
<option value="3">Adobe Indesign</option>
<option value="4">Adobe Photoshop</option>
<option value="5">Apple DVD Studio Pro</option>
<option value="6">Apple FinalCutPro</option>
<option value="7">Extensis Suitcase</option>
<option value="8">Macromedia Freehand</option>
<option value="9">Macromedia Studio MX Mac</option>
<option value="10">MeetingMaker</option>
<option value="11">Microsoft Office Mac X</option>
<option value="12">Microsoft Office Win32 Unlisted</option>
<option value="13">QuarkXPress</option>
<option value="14">Terran Cleaner</option>
<option value="15">Timbuktu</option>
</table>
<p><input type="submit" name="submit" value="Rechner hinzufügen >>" class="submit"></p>
</form>

<?PHP
}
?>

bitte besonders auf "softwareID[]" achten !!!!