I have a php script that inserts data in a table. It used to work. Now it doesn't.
Here are the lines in question. The variables that aren't defined in there have been passed on via a form.
$ip=$REMOTE_ADDR;
$answered="n";
$message=addslashes($message);
$sql=mysql_query("INSERT INTO question (name, message, email, ip, answered) VALUES ('$name', '$message', '$email', '$ip', '$answered')");
and here is the error.
Warning: 0 is not a MySQL link index in /home/slangdes/slangdesign-www/advice/input.php3 on line 8
Warning: Cannot add more header information - the header was already sent (header information may be added only before any output is generated from the script - check for text or whitespace outside PHP tags, or calls to functions that output text) in /home/slangdes/slangdesign-www/advice/input.php3 on line 9
Line 8 is the last line of my code.