[b]I have come this fare
I have come this fare making a cms.
I would like to remove a row ( a item containing a photo,text, time, link) from a db.
A have 5 tabels (work,blog, lab, education,photos).
On a clik on the displayed item.
thanks dp Amsterdam 25-6[/b]
<?php //--------------------- // Table input //-------------------------- $teller=0; $file=array('work','lab','photos','education','blog','contact'); for($i=0;$i<=5;$i++){ $result = mysql_query("SELECT * FROM $file[$i] ORDER BY id DESC")or die(mysql_error()); echo '- ';
while($row = mysql_fetch_array( $result )){
$teller++;
echo '
- ';
echo $row[id];
echo'
'; echo $file[$i]; echo'
'; echo $teller; ${$row[id].$teller}=$row[id]; ${$file[$i].$teller}=$file[$i]; echo'';
//--------problem
echo’’;
echo’<input name=“nr” type=“hidden” value="’${$row[id].$teller}’"/ >’;//---------
echo’’;
echo’’;
echo’
’;
echo’’;
echo ‘’.$row[“kop”].’’;
echo ‘’;
echo ‘<img src=foto/’.$row[“fotoid”].’ hight=“100%” width=“100%” >’ ;
echo’’;
}
echo’ ’;
}
echo ‘
- ’;
//-----------------------verwijder// weg = delite.
$Nr=$_Post[nr];
$Tabel=$_post[tabel];
function weg($Nr,$Tabel){
//if($Tabel!= “”||$Nr!==""){
mysql_query(“DELETE FROM $Tabel WHERE id=’$Nr’”)
or die(mysql_error());
echo’weg’.$Tabel.’–’.$Nr ; }
//}
//----------------------------
?>