måndag 21 mars 2011

Delete from MySQL with PHP


$logID = $_GET['id'];

open_db('mydb');

$query = "DELETE FROM conversionlog WHERE logID = '$logID'";
$result = mysql_query($query)
or die("Query failed: ".mysql_error());

close_db();

header("Location: page.php?action=viewcases&hl='$logID'");