I've been inserting entries into a database using PHP for about a year now, then all of a sudden today they stop inserting. I can't work out why. Nothing has changed (as far as I know anyway!) Can anyone tell me what's wrong please:
include('db_functions.php');
connect_to_db();
$query="insert into mixtable (date, djname, title, description, music, tracklist, deleted) values ('".$date."','".$djname."','".$title."','".$description."','".$music."','".$tracklist."', 0)";
$result=mysql_query($query);
if(mysql_affected_rows()==1){
Header("Location:admin.php?op=admin&mix=added&news=null");
}
else{
die("there was a problem");
}
The db_functions work fine, I know this because on another page I call up the database info using the db_functions and it works fine. All of the variables exist as do the table entries. Like I said, this has been working fine for about a year now.
The problem I get is the "there was a problem" error. I've tried showing all errors, but that doesn't show anything either. I can't work out what it is. Any ideas?
Thanks in advance.