Notice: Undefined index: date in d:\InetPub\wwwroot\wask\view.php on line 89
the line looks like this
Code: Select all
$date=$rї"date"];Notice: Undefined variable: id in d:\InetPub\wwwroot\wask\delete.php on line 14
Notice: Undefined variable: result in d:\InetPub\wwwroot\wask\delete.php on line 16
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in d:\InetPub\wwwroot\wask\delete.php on line 16
the code for this is as follows
Code: Select all
<?
/* You must replace username, password and
database with the values your host has given you */
$db = mysql_connect("localhost","wask5600","5600wask");
mysql_select_db ("wask") or die ("Cannot connect to database");
/* We have now connected, unless you got an error message */
/* Lets post some news ! */
$query = "DELETE FROM news WHERE id = $id";
while($r=mysql_fetch_array($result))
{
/* This bit sets our data from each row as variables, to make it easier to display */
$id=$rї"id"];
$title=$rї"title"];
/* Now lets display the titles */
echo "<A HREF="delete_process.php?id=$id">$title</A><BR>";
}
?>aaron