Markus: submit( )

Beitrag lesen

vielen zuerst mal für Deine Mühe ...
leider funktioniert dies auch noch nicht ...

ich gib Die jetz mal mein Formular:

--------------------------------------------------
echo "<form name='reporter' action='report.php' method='get'>
  <table class=bg0border align=center>
    <tr align='left'>
      <th>Location</th>

<th>Project</th>

<th>Month</th>
      <th>Year</th>
      <th>processed by</th>
      <th>Options</th>
   <th></th>
   <th></th>
    </tr>
    <tr>"; #1.Zeile
 // Standort-Auswahl
  $ssql = "select loc_name, location_id from location";
  $sel_loc = "";
  if ($sel_loc!="") { $ssql .= " where location_id ='$sel_loc' order by location_id"; }
  else              { $ssql .= " order by location_id"; };
  echo "<td>"; #1.Spalte
  #create_select("location", $conn, $ssql, $location);

echo "<select NAME='location' SIZE='$size' onchange='document.reporter.submit()'>\n";
  #echo "<select NAME='location' SIZE='$size' >\n";
 $result = pg_exec ($conn, $ssql);
 $num = pg_numrows($result);
 for ($i=0; $i < $num; $i++) {
  $r = pg_fetch_row($result, $i);
  if ($i==0) { if ($location=="")  { $location=$r[1]; } }
  if ($r[1]==$location) {
    echo "<option selected value='$r[1]'>$r[0]</option>\n";
  }
 else {
    echo "<option value='$r[1]'>$r[0]</option>\n";
  }
 }
echo "</select></td>\n";

#Projekt-Auswahl:
  $ssql  = "select name,project_nr from projects where locationid = '" . $location_sel . "' or locationid = NULL";
 echo "<td><select NAME='project'>\n";
 echo "<option selected value='all'>All Projects</option>\n";
 $result = pg_exec ($conn, $ssql);
 $num = pg_numrows($result);
 for ($i=0; $i < $num; $i++)
 {
  $r = pg_fetch_row($result, $i);
  if ($r[1]==$project_sel)
  {
   echo "<option selected value='$r[1]'>$r[0]</option>\n";
  }
 else {
    echo "<option value='$r[1]'>$r[0]</option>\n";
  }
}
echo "</select></td>";

// Datum Monat
  $actual_month = date("n");
 echo "<td><select name='month' size=1>\n";
 if (isset($month)) {
  $actual_month = $month;
 }

#Monate anhaengen:
 for ($i=1; $i<=12; $i++) {
   if ($actual_month==$i) { $selected="selected"; } else { $selected=""; }
   echo sprintf("<option $selected value='%02d'>%d</option>\n", $i, $i);
 }
 if ($actual_month=="all") { $selected="selected"; } else { $selected=""; }
 echo "<option $selected value='all'>All</option>\n";
 echo "</select></td>\n";

// Datum Jahr
 $jahr = date("Y");
 echo "<td><select name='year' size=1>\n";
 for ($i=$jahr; $i>=$jahr-3; $i--) #zusätzlich letzten 3 Jahre anzeigen
 {
   if ($year==$i) { $selected="selected"; } else { $selected=""; }
   echo "<option $selected value='$i'>$i</option>\n";
 }
 echo "</select></td>\n";

// Benutzerauswahl
  $ssql = "select name, id from projectusers";
  $sel_usr = "";
  if ($sel_usr!="") { $ssql .= " where id ='$sel_usr' order by name"; }
  else              { $ssql .= " order by name"; };
  echo "<td>";
  create_select("user", $conn, $ssql, $user);
 echo "</td>";
 echo "<td>";

// Checkbox fuer Detailbeschreibung
 if ($cb_desc=="on") { $checkit = "checked='true'";}
 echo "<input type='checkbox' $checkit name='cb_desc' value='on'>Description";
 echo "</td><td>";

// Checkbox fuer Summe
    if ($cb_sum=="on") { $checkit_sum = "checked='true'";}
    echo "<input type='checkbox' $checkit_sum name='cb_sum' value='on'>Sum";
    echo "</td><td>";

// Submit Button
 echo "<input type='submit' name='submit' value="List" size=15>";

echo "</td></tr>\n";
    echo "</form>\n";
    echo "</table>\n";
--------------------------------------------------

Danke schon mal...

mfG,
   Markus.