This query doesn't work. What have I dont wrong?

mysql_query("INSERT INTO list (title, url, description) 
VALUES ('$title', '$addtolist', '$description') 
DELETE FROM spider WHERE url='$addtolist'");

Heres the whole page if it makes things clearer.

<?php
include('includes/config.php');

$addtolist = $_GET['add'];

$open = file_get_contents($addtolist);

$title = get_inner_string($open, '<title>', '</title>');

$description = get_inner_string($open, '<meta name="description" content="', '" />');

mysql_query("INSERT INTO list (title, url, description) 
VALUES ('$title', '$addtolist', '$description') 
DELETE FROM spider WHERE url='$addtolist'");

header('Location: moderation.php');
?>

Try

mysql_query("INSERT INTO `list` (`title`, `url`, `description`) VALUES ('$title', '$addtolist', '$description')");
mysql_query("DELETE FROM `spider` WHERE url='$addtolist'");
Comments
thanks

Ah that works :p

I do no where near enough work with MySQL. Thanks.

This question has already been answered. Start a new discussion instead.