Kai: dynamisches löschen einer reihe ????

Beitrag lesen

hi nochmal,

meine schleife sieht jetzt so aus :

<?

$sql = "select titel, bilder, beschreibung,id from gallery ORDER BY id desc";
    $rs = mysql_query($sql);
     while($arr = mysql_fetch_array($rs)) {
     echo"

<tr>
           <td colspan='6' width='100%'>"."$arr[titel]"."</td>
           </tr>
           <tr>
           <td colspan='6' width='100%'><img src='img/px.gif' width='1' height='10'></td>
           </tr>
           <tr>
           <td width='25%'><img src='test/"."$arr[bilder]"."' width='150'></td>
           <td width='10'><img src='img/px.gif' width='10' height='1'></td>
           <td width='75%' valign='top'>"."$arr[beschreibung]"."</td>
           <td width='10'><img src='img/px.gif' width='10' height='1'></td>
           <td width='75%' valign='top'>
           <form enctype='multipart/form-data' action='losch.php' method='post'>

<input type='hidden' name='id' value='"."$arr[id]"."'><br>
           <input type='submit' value='loschen'>
           </td>
           <td>

</td>
           <td width='10'><img src='img/px.gif' width='100' height='1'></td>
          </tr>
          <tr>
           <td colspan='6' width='100%'><img src='img/px.gif' width='1' height='10'></td>
           </tr>";
       }
  ?>

aber was schreib ich in meinen action befehl: ???

<?php

include "../../includes/connect.php";

if (isset($Submit)) {
   $sql =" DELETE FROM gallery WHERE name='id' ";
   $res = mysql_query($sql);
   if ($res) {
    echo "Newsbox geleert, bitte neuen eintragen<br><br>Bitte News-Daten <a href='eintrag_infobox_db.php' target='frameco'> <u>hier</u> </a>aktualisieren";
   }
   else {
    echo "Konnte die News- page nicht aktualisieren  :-(  !!<br><br><a href='../eingeloggt.php' target='frameco'>zurück zum Admin-Bereich</a>";
   }
  }
  else {
  ?>

;-(

please help !!!!