Location: PHPKode > projects > MP3 Intranet > mp3i-0.3.1/delete.php
<? if(!$yes) { ?>

	<font face="Verdana">
	<table align="center" width="50%" cellspacing="0" cellpadding="0">
	<form action="<?= $PHP_SELF; ?>">
	 <tr>
	  <td nowrap align="center" bgcolor="#c0c0c0">Are you sure you want to delete this?</td>
	 </tr>

	 <tr>
	  <td nowrap>&nbsp;</td>
	 </tr>

	 <tr>
	  <td nowrap align="center"><input type="submit" name="yes" value="YES">&nbsp;<input type="submit" name="no" value="NO"></td>
	 </tr>

	 <tr>
	  <td nowrap>&nbsp;</td>
	 </tr>

	<?
	print " <tr>\n";
	print "  <td nowrap align=\"center\">[ <a href=\"search.php?search=$search&limit=$limit&offset=$offset\">Go Back</a> ]</td>\n";
	print " </tr>\n";
	?>

	<input type="hidden" name="id" value="<?= $id; ?>">
	<input type="hidden" name="search" value="<?= $search; ?>">
	<input type="hidden" name="limit" value="<?= $limit; ?>">
	<input type="hidden" name="offset" value="<?= $offset; ?>">
	</form>
	</table>
	</font>

<? } else { ?>
<?
if($yes == "YES")
{ 
	$sql = "DELETE FROM songs WHERE id='$id'"; 
	$result = mysql_query($sql, $db);
	if(!mysql_error())
	{
		print "<font face=\"Verdana\">\n";
		print "<table align=\"center\" width=\"50%\" cellspacing=\"0\" cellpadding=\"0\">\n";
		print " <tr>\n";
		print "  <td nowrap align=\"center\" bgcolor=\"#c0c0c0\">Record Deleted</td>\n";
		print " </tr>\n";
		print "\n";
		print " <tr>\n";
		print "  <td nowrap>&nbsp;</td>\n";
		print " </tr>\n";
		print "\n";
		print " <tr>\n";
		print "  <td nowrap align=\"center\">[ <a href=\"search.php?search=$search&limit=$limit&offset=$offset\">Go Back</a> ]</td>\n";
		print " </tr>\n";
		print "</table>\n";
		print "</font>\n";
	}
}
?>
<? } ?>

Return current item: MP3 Intranet