|
Hi Lars,
I can't remember if I had a problem with this or not but it looks like some of your quotations around the $insert function might be wrong?
It could just be the way it looks due to the forum/browser, but try this:
N.B. I will put extra spaces in just to be extra clear on which quotes to use, in practice you can remove them:
Instaed of this:
// Create an SQL query (MySQL version)
$insertQuery = "INSERT INTO articles (title,tagline,section,article) VALUES (".
"'".$HTTP_POST_VARS['title']."', ".
"'".$HTTP_POST_VARS['tagline']."', ".
$HTTP_POST_VARS['section'].", ".
"'".$HTTP_POST_VARS['article']."')";
try:
// Create an SQL query (MySQL version)
$insertQuery = "INSERT INTO articles (title,tagline,section,article) VALUES (' " .
$HTTP_POST_VARS['title']." ' , ' ".
$HTTP_POST_VARS['tagline']." ', ' ".
$HTTP_POST_VARS['section']." ', ' ".
$HTTP_POST_VARS['article']." ' )";
I appreciate that these differences are subtle and might not be easy to see, but look closely between the " and ' and hopefully you'll see a difference.
If you copy and paste that second version it might work?
Good luck
Chip
|