bnorcom Posted January 24, 2017 Share Posted January 24, 2017 Used your Script 12.4 on page 362 as an example to test my code at my Web host. Kept getting an SQL error of invalid syntax. Did some research on the Internet and someone's reply had an answer. I'm using the object oriented approach as opposed to the procedural. So the executable part would be: $db = new mysqli (etc.); if($db->query($sql) === TRUE {etc. The last part of the $sql statement in your script would then be: etc. VALUES (0, '" .$title. "', '" .$entry. "'," NOW())"; The PHP engine on my site doesn't like the syntax of a straightforward statement, so you have to separate the variables and include single quotes within quotes so that the variables will be properly surrounded with quotes. Link to comment Share on other sites More sharing options...
Larry Posted January 29, 2017 Share Posted January 29, 2017 Thanks for sharing! Link to comment Share on other sites More sharing options...
Recommended Posts