Note: note sure if the MYSQL is a better forum - if so please tell me - I'm really not sure which to post to. Anyway please see ques. below,
// This statement below works:
// mysql_query("INSERT INTO page (page_url) VALUES (\"$url_field\")");
But I wanted to insert into two fields so I was trying all sorts of escaping. See below...there must be an easier way?! I also cite the syntax error - Thanks very much.
mysql_query("INSERT INTO page (page_url, title) VALUES
( \"$url_insert . "\", "." \"$title_field "." "\")");
I don't understand how to escape and I imagine there's an easier way! Thanks!
Error message
C:\Program Files\Apache Group\Apache2\htdocs>php -l populate2.php
<br />
<b>Warning</b>: Unexpected character in input: '\' (ASCII=92) state=1 in <b>C:\Program Files\Apache Group\Apache2\htdocs\populate2.php</b> on line <b>56</b><br />
<br />
<b>Parse error</b>: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in <b>C:\Program Files\Apache Group\Apache2\htdocs\populate2.php</b> on line <b>56</b><br />
Errors parsing populate2.php
// This statement below works:
// mysql_query("INSERT INTO page (page_url) VALUES (\"$url_field\")");
But I wanted to insert into two fields so I was trying all sorts of escaping. See below...there must be an easier way?! I also cite the syntax error - Thanks very much.
mysql_query("INSERT INTO page (page_url, title) VALUES
( \"$url_insert . "\", "." \"$title_field "." "\")");
I don't understand how to escape and I imagine there's an easier way! Thanks!
Error message
C:\Program Files\Apache Group\Apache2\htdocs>php -l populate2.php
<br />
<b>Warning</b>: Unexpected character in input: '\' (ASCII=92) state=1 in <b>C:\Program Files\Apache Group\Apache2\htdocs\populate2.php</b> on line <b>56</b><br />
<br />
<b>Parse error</b>: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in <b>C:\Program Files\Apache Group\Apache2\htdocs\populate2.php</b> on line <b>56</b><br />
Errors parsing populate2.php