hallo aus irgendeinem grund wird nicgts in die db geschrieben
obwohl die inhalte der formularfelder übermitteld werden
es wird nämlich nach dem ausfüllen des
formulars und dem submit button klicken folgendes angezeigt
"Array ( [datum2] => 2004-10-05 [zeit2] => 18:30:00 [art2] => Kinofahrt \"The Village\" [Submit] => einfügen ) Resource id #5"
das ändern und löschen funtzt auch nicht, weil die id nicht mitübermittelt wird
	
							
						
					obwohl die inhalte der formularfelder übermitteld werden
es wird nämlich nach dem ausfüllen des
formulars und dem submit button klicken folgendes angezeigt
"Array ( [datum2] => 2004-10-05 [zeit2] => 18:30:00 [art2] => Kinofahrt \"The Village\" [Submit] => einfügen ) Resource id #5"
das ändern und löschen funtzt auch nicht, weil die id nicht mitübermittelt wird
PHP-Code:
	
	
<table border="1" width="100%">
  <tr bgcolor="#80EEEE">
      
    <td width="3%" ><B><a href="edit.php?sort=0">Nr</a></B></td>
    <td width="25%" ><B><a href="edit.php?sort=1">Datum</a></B></td>
    <td width="25%" ><B><a href="edit.php?sort=2">Zeit</a></B></td>
    <td width="37%" ><B><a href="edit.php?sort=3">Art</a></B></td>
    <td width="10%" ><B>Bearbeitung</B></td>
  </tr>
  <form action="edit.php?sort=<? echo $sort; ?>&id=<? echo $id;?>" method="post">
  <tr bgcolor="#80EEEE">
    <td width="3%" > </td>
    <td width="25%" ><input name="datum" type="text"  size="10"></td>
    <td width="25%" ><input name="zeit" type="text"  size="10"></td>
    <td width="37%" ><input name="art" type="text"  size="50"></td>
    <td width="10%" ><input type="submit" name="Submit" value="Suchen"></td>
    </form>
  </tr>  
    <form action="edit.php?sort=<? echo $sort; ?>&id=<? echo $id;?>" method="post">
     <tr bgcolor="#80EEEE">
       <td width="3%" > </td>
    <td width="10%" ><input name="datum2" type="text"  size="10">JJJJ-MM-TT </td>-
    <td width="10%" ><input name="zeit2" type="text"  size="10">std:min:sek </td>
    <td width="37%" ><input name="art2" type="text"  size="50"></td>
    <td width="10%" ><input type="submit" name="Submit" value="einfügen"></td>
    </form>
  </tr>
  
<?
include ("config.inc.php");
include ("../php/fn_global.inc.php");
$link = OpenDatabase ();
$sql = "SELECT id, datum, zeit, art FROM mbr_freizeit_wa";
print_r ($_POST);
switch ($_GET["sort"] )
{
    case 0: $sql = $sql . " order by id";
            break;
    case 1: $sql = $sql . " order by datum";
            break;
    case 2: $sql = $sql . " order by zeit";
            break;
    case 3: $sql = $sql . " order by art";
            break;
    case 4: $sql1 = "INSERT INTO mbr_freizeit_wa SET datum = '$datum2', zeit ='$zeit2', art = '$art2'";
            $result = mysql_query($sql1,$link);
            $sql = $sql . " order by id";
            break;
    case 5: $sql1 = "UPDATE mbr_freizeit_wa SET datum = '$datum2', zeit ='$zeit2', art = '$art2' WHERE id =" . $id;
            $result = mysql_query($sql1,$link);
            $sql = $sql . " order by id";
            break;
    case 6: $sql1 =  "DELETE mbr_freizeit_wa WHERE id =" . $id;
            $result = mysql_query($sql1,$link);
            $sql = $sql . " order by id";
            break;
}
$result = mysql_query($sql,$link);
echo $result;
if (mysql_errno()) die ("MySQL-Error: " . mysql_error());
if ($Debug) echo $sql . "<br>";
if ($Debug) echo mysql_error();
// Spalteninhalte
   while ($dsatz = mysql_fetch_assoc($result))
   {
           echo "<tr bgcolor='#EEFFCC'>";
        echo "<td>" . $dsatz["id"] . "</td>"; 
        echo "<td width='10%' ><input name='datum2' type='text'  value='" . $dsatz["datum"] . "' size='10'></td>";
           echo " <td width='10%' ><input name='zeit2' type='text'  value='" . $dsatz["zeit"] . "' size='10'></td>";
          echo " <td width='37%' ><input name='art2' type='text'  value='" . $dsatz["art"] . "' size='50'></td>";
        echo "<td ><B><a href='edit.php?sort=5&id=$id'>änderrn</a></B><B><a href='edit.php?
sort=6&id=$id'> löschen</a></B></td></tr>";
        
    }
?>
<tr bgcolor="#80EEEE"><td colspan="5"><br>  <div align="center">
<p>Abfahrt zu den Fahrten ist jeweils am Eingang WH-4<br>Bitte 
melden Sie sich rechtzeitig beim FPD, Int.2 (Tel. 1250),oder abends 
in der Cafeteria am See an</p>
</div></td></tr>
</table>
 
          
Kommentar