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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php