You need to escape the quotes.
PHP Code:
//if you're using double-quotes to define the string,
//escape double-quotes inside the string
$string = "I said \"Hello\" to my brother's friend";
//if you're using single-quotes to define the string,
//escape single-quotes inside the string
$string = 'I said "Hello" to my brother\'s friend';
Just FYI:
Single-quotes have some advantage in parsing time, so I usually use them if the string is only text. In order to evaluate variables, however, you need to use double-quotes:
PHP Code:
$name = 'Joe Smith';
$hiJoe = "Hi, $name"; // outputs: Hi, Joe Simth
$hiJoe = 'Hi, $name'; // wrong- outputs: Hi, $name
Your SQL problem is the array variables - MySQL doesn't like them. Assign the values to strings first:
PHP Code:
$product = $_POST['product'];
$about = $_POST['about'];
$url = $_POST['url'];
mysql_query("INSERT INTO this (product, about, date, time, url)
VALUES('$product', '$about', '$date', '$time', '$url')")
Bookmarks