I am a newbie, and am readin MySQL and PHP For Dummies 3rd edition. All the programs have double quotes in them, but whenever I have a double quote in them, I get this error:
Parse error: syntax error, unexpected '>' in C:\****\test\mysql_send.php on line 6
Is there a setting that I need to change somewhere? Is it magic quotes?
For example, this code will give me the same error as above...
Code:
<?php
/*Program: mysql_send.php
*Desc: PHP program that sends an SQL query to the
* MySQL server and displays the results.
*/
echo ?<html><head><title>SQL Query Sender</title></head><body>?;
The error I recieve is
Parse error: syntax error, unexpected '>' in C:\****\test\mysql_send.php on line 6
Then, I remove the " in line 6, and replace it with a ', and I get this error, (I will put it in the edit section)
(Cont. Question)
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in C:\****\test\mysql_send.php on line 6
Parse error: syntax error, unexpected '<' in C:\****\test\mysql_send.php on line 6
I remove the " on line 8 and replace it with a '...and its fixed. But I get a different error with the ECHO statement, the following is line 22, 23, and 24 of the same program:
echo ?Database Selected: <b>{$_POST[?database?]}</b><br>
Query: <b>{$_POST[?query?]}</b><h3>Results</h3><hr>?;
I get this error for that line:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\kyle\testing\mysql_send.php on line 22