hi i need a to delete all the contents of a table in my sql and insert a new thing into that table here is my try at it
<?php
include("database.php");
$mum="DELETE * FROM bignews ";
if (!mysql_query($mum))
{
die('Error: ' . mysql_error());
}else{
$sql="INSERT INTO bignews (`news`, `date`, `name`, `itemname` `id`)
VALUES
('$_POST[news]','$_POST[date]','$_POST[name]','$_POST[item]','1')";
if (!mysql_query($sql))
{
die('Error: ' . mysql_error());
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Redirecting...</title>
<meta http-equiv="REFRESH" content="0;url=index.html"></HEAD>
<body>
</body>
</HTML>
the sql is on the include("database.php");