Trying to delete

From: Date: Wed, 14 Aug 2002 02:47:02 +0000
Subject: Trying to delete
Groups: php.db php.general 
Request: Send a blank email to php-db+get-21130@lists.php.net to get a copy of this message
Hi all. I have a small problem here. I have this full-PHP site working with a MySQL db and came to a dead road when trying to delete a record from it from the Administrator's page. I have PHP to make this decision after the Administrator selected the record to delete and answered YES to the ¿Are you sure...? The last part will pass a hidden value of $editpic which tells the deleting script which artid to delete from the db. This is the code that does the deletion: else if ($deleteyes) { $query = "DELETE FROM saav_arts WHERE artid = '$editpic' LIMIT 1"; $result = mysql_query($query) or die (mysql_error()); if (!$result) { echo "The Picture could NOT be deleted<br>"; echo "<form action=\"".$PHP_SELF."\" method=\"post\">"; echo "<input type=\"submit\" name=\"cancel\" value=\"Back to Edition\">"; echo "</form>"; } else if ($result) { echo "The Picture was deleted sucsesfully<br>"; echo "<form action=\"".$PHP_SELF."\" method=\"post\">"; echo "<input type=\"submit\" name=\"cancel\" value=\"Back to Edition\">"; echo "</form>"; } } Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621

« previous php.db (#21130) next »