I Have 2 1064 SQL Errors And Can Not Figure Them Out
<p>This code worked good on ph 5.3. My server got upgraded to php5.6 and now the code no longer works.</p>

<p>Here is the two statements. </p>

<pre><code>$sql = "UPDATE " . FORUM_TOUR_TABLE . "
            SET page_subject = '$subject', page_text = '$message', page_access = $page_access
            WHERE page_id = $id";
</code></pre>

<p>It says : </p>

<p>`SQL Error : 1064 Syntax error near 'WHERE page_id = 1' at line 3</p>

<p>UPDATE SET phpbb_forum_tour page_subject = ' Welcome To The Tower' , page_text = ' Update me please ' = WHERE page_access page_id = 1</p>

<p>Line : 172
File: admin_forum_tour.php` </p>

<p>That happens when I try to update a post. </p>

<p>When I try to add a new post using this code:</p>

<pre><code>$sql = "INSERT INTO " . FORUM_TOUR_TABLE . " (page_id, page_subject, page_text, page_sort, bbcode_uid, page_access)
            VALUES ($id, '$subject', '$message', $page, '$bbcode_uid', $page_access)";
</code></pre>

<p>This gives me this:</p>

<p>`SQL Error : 1064 Syntax error near ')' at line 2</p>

<p>INSERT INTO phpbb_forum_tour ( page_id , page_subject , page_text , page_sort , bbcode_uid , page_access ) VALUES (3, '2 Word Rule ', ' Hello World I am here ', 30 , ' f4e1be18dc ' )</p>

<p>Line : 198
File: admin_forum_tour.php`</p>

<p>I 100% apologize for asking this as I am more than sure it has been beat to death. I have been searching for a couple hours now and have all but given up. I had it working once but was told I opened my self up to injection. I am not a pro coder. I get lucky sometimes and make things work. I am sure these errors and code is basic to most but I am still learning. </p>

<p>Thanks for helping and understanding my "newbieness".</p>