Hi,
ich möchte erreichen, daß bei fehlerhaftem Ausfüllen eines Formulars dasselbe Formular nocheinmal angezeigt wird. Das Problem liegt darin, daß der Inhalt der Mehrfachauswahlbox anschließend nicht mehr vollständig ist. Die Daten der Box liegen in einem array. M.E. muß ich dieses (Original-)array mit übergeben?.? Kann mir jemand helfen???
<?php
$root_path = (eregi("/plugins/", $PHP_SELF)) ? "./../../" : "./../";
define('ROOT_PATH', $root_path);
require(ROOT_PATH.'admin/admin_global.php');
if ($action == "") {
$entrys = array();
for($i=0;$i<10;$i++) {
$entrys[$i]="track".$i;
}
$table_select = "<select name="entrys0[]" size="15" multiple>\n";
for($i=0;$i<count($entrys);$i++) {
$table_select .= "<option value"".$entrys[$i].""";
$table_select .= " selected";
$table_select .= ">".$entrys[$i]."huhu"."</option>\n";
}
$table_select .= "</select>\n";
$table_select .= "<input type="hidden" name="entrys[]" >\n";
}
if ($action == "test") {
printf(count($entrys)."<br/>");
printf(count($entrys0)."<br/>");
for($i=0;$i<count($entrys);$i++) {
printf("Entry".$i.": ".$entrys[$i]."<br/>");
}
}
show_form_header($PHP_SELF, "test");
show_table_header("Dateiauswahl", 2);
echo $table_select;
show_form_footer($lang['submit'], $lang['reset'], 2);
?>
Danke und Gruß!