This text is suppose to allow me to delete a desired database item..... but it wont work for me. It does not give me any errors, and I have create a forum to add to the database, so I can add text but cannot delete them(unless I go in manually),
I am very new to php, so maybe I am makinig some stupid mistake like a missing common or wrong something or other. Does anyone know why this code will not work???
<form action="<?=$PHP_SELF?>" method="post">
<p>type number here:<br />
<textarea name="jokeid" rows="2" cols="2" wrap>
</textarea><br />
<input type="submit" name="jokenum" value="SUBMIT" /></p></form>
<?php
if($jokenum == "submit")
{
$sql = "delete from joke where id=$jokeid";
if (@($sql))
{ echo("<p>Your joke has been deleted.</p>"); }
else { echo("<p>Error delete submitted joke: " . mysql_error() . "</p>"); }};
?>