ich habe mit dem Quelltext folgendes Problem: Bei der Übertragung der " Einsatzkräfte" wird immer nur die erste auswahl übermittelt. So wenn ich das mit Arrays machen würde sollte dies doch gehen oder ? Allerdings verstehe ich das noch nicht sooo ganz, vielleicht hätte jemand kurz zeit sich das anzusehen?!
HTML-Quellcode
- <tr><td colspan="4">Einsatzkräfte</td></tr>
- <tr><td colspan="4">
- <p>
- <select name="ekraefte[]" size="5" multiple="multiple">
- <option>LF 8/6</option>
- <option>LF 16 TS</option>
- <option>LF 8/18</option>
- <option>SW 2000</option>
- <option>MTF</option>
- </select>
- </p>
- </td></tr>
- <tr><td colspan="4">Text</td></tr>
- <tr><td colspan="4"><textarea cols="50" rows="10" name="etext" maxlenth="2000"></textarea></td></tr>
- <tr><td valign="top"><input type="submit" value="Eintragen" class="schalter"></td>
- <td valign="top"><input type="reset" value="Felder löschen" class="schalter"></td></tr>
- </form>
- <?php
- if ($_POST['passwort'] == "XXXX") {
- if ($_POST['ttag'] <> "") {
- $dbf = dbase_open("einsaetze.dbf",2);
- $anzahl = dbase_numrecords($dbf);
- $index = time();
- $tjahr = $_POST['tjahr'];
- $tmonat = $_POST['tmonat'];
- $ttag = $_POST['ttag'];
- $etext = $_POST['etext'];
- $euhrzeit = $_POST['euhrzeit'];
- $edauer = $_POST['edauer'];
- $egebiet = $_POST['egebiet'];
- $ekraefte = $_POST["ekraefte[]"];
- if ($tjahr < 2000) {$tjahr = $tjahr + 2000;}
- $esort = $tjahr*10000 + $tmonat*100 + $ttag;
- $depp = "<b>Achtung - Falscheintrag, dieses Datum gibt es nicht!</b><br>";
- if ($tmonat > 12) {$etext = $depp." ".$etext;}
- if ($ttag > 31) {$etext = $depp." ".$etext;}
- if ($tmonat == 4) { if ($ttag > 30) {$etext = $depp." ".$etext;} }
- if ($tmonat == 6) { if ($ttag > 30) {$etext = $depp." ".$etext;} }
- if ($tmonat == 9) { if ($ttag > 30) {$etext = $depp." ".$etext;} }
- if ($tmonat == 11) { if ($ttag > 30) {$etext = $depp." ".$etext;} }
- if ($tmonat == 2) { if ($ttag > 29) {$etext = $depp." ".$etext;} }
- $sj = bcmod($tjahr,4);
- if ($tmonat == 2) { if($sj <> 0) { if($ttag > 28) {$etext = $depp." ".$etext;} } }
- if ($ttag == "1") {$ttag = "01";}
- if ($ttag == "2") {$ttag = "02";}
- if ($ttag == "3") {$ttag = "03";}
- if ($ttag == "4") {$ttag = "04";}
- if ($ttag == "5") {$ttag = "05";}
- if ($ttag == "6") {$ttag = "06";}
- if ($ttag == "7") {$ttag = "07";}
- if ($ttag == "8") {$ttag = "08";}
- if ($ttag == "9") {$ttag = "09";}
- if ($tmonat == "1") {$tmonat = "01";}
- if ($tmonat == "2") {$tmonat = "02";}
- if ($tmonat == "3") {$tmonat = "03";}
- if ($tmonat == "4") {$tmonat = "04";}
- if ($tmonat == "5") {$tmonat = "05";}
- if ($tmonat == "6") {$tmonat = "06";}
- if ($tmonat == "7") {$tmonat = "07";}
- if ($tmonat == "8") {$tmonat = "08";}
- if ($tmonat == "9") {$tmonat = "09";}
- $edatum = $ttag.".".$tmonat.".".$tjahr;
- $dummy = array(
- $esort,
- $edatum,
- $euhrzeit,
- $edauer,
- $egebiet,
- $ekraefte,
- $etext,
- $index);
- dbase_add_record($dbf,$dummy);
- dbase_close($dbf);
- echo "<tr><td colspan=\"3\">Die Daten wurden erfolgreich gesendet.</td></tr>\n";
- }
- }
- ?>
- </table>
- <br><br><a href="http://www.freesoft-board.to/intern/index.php">zurück</a>
- </body>
- </html>
Grüße
Holger