More info:
Here is the code:
$title = trim($title);
$title = addslashes($title);
$price = doubleval($price);
$duration = doubleval($duration);
$comments = trim($comments);
$comments = addslashes($comments);
$leadmsg = trim($leadmsg);
$leadmsg = addslashes($leadmsg);
$active = doubleval($active);
echo $title. " = Title \n";
echo $price. " = Price \n";
echo $active. " = Active.\n";
echo $duration. " = Duration. \n";
echo $comments. " = Comments. \n";
$result = dbquery("INSERT INTO plays (playid, title, price, duration, comments, active, leadmsg) VALUES (NULL, '$title', $price, '$duration', '$comments', '$active', '$leadmsg')");
Please note the echo statements are to test the output of variables. They are correct.
I get an error message:
add = Mode out of IF. =ID out of IF.My Title = Title 2 = Price 1 = Active. 1 = Duration. Let\\'s see about this. = Comments. Query failed - INSERT INTO plays (playid, title, price, duration, comments, active, leadmsg) VALUES (NULL, 'My Title', 2, '1', 'Let\\'s see about this.', '1', '')
You can see the test variable info coincides with the INSERT but nothing happens