I have a php variable
$query="insert into msnowplaying values";
Then, I want to append a query string
$q1="('1', '$selMovieTitle1', 'ST001', '1', '' )";
$query.=$q1;
echo "<script type='text/javascript'>alert('$query');</script>";
However, the alert shows nothing. Somehow, there's an error on the console:
[10:12:06.851] SyntaxError: missing ) after argument list @ http://localhost:1234/2013_12_2/controller/doaddNowPlaying.php:1
What am I missing?
I've changed $q1
to " a"
and the alert shows insert into msnowplaying values a
I don't know what happened, I really need some help. Thanks.