View Full Version : What's wrong with my code....

08-01-2005, 09:58 AM
Hi all.

I'm in the process of creating a search form which displays results based on the checkboxes and fields entered in the search. I'm receiving the following error when I submit the search:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/cjpqapym/public_html/results5.php on line 33

A shortened version of Line 33 is :

$query_m = "SELECT TestTable.autonumber, TestTable.sex, TestTable.firstname, TestTable.nationality, TestTable.private_price FROM TestTable WHERE TestTable.language LIKE '%" . $_POST["language"] . "%' .......... AND TestTable.private_price <= " . $_POST["private_price"]" AND TestTable.teachingexperience >= " . $_POST["teachingexperience"] ;

I suspect the problem lies in the end part of the query as before I added that part, the query was working;

.... AND TestTable.teachingexperience >= " . $_POST["teachingexperience"] ;

I've tried adding quotes and removing quotes (and various things) to the end but keep getting error messages. Any help would be gratefully appreciated.

The form can be found at:
http://www.orangutanenglish.com/search5.php ('http://www.orangutanenglish.com/search5.php')

Many thanks for reading this



08-01-2005, 04:08 PM
Got it :

You're missing a dot (.) Should be:

...AND TestTable.private_price <= " . $_POST["private_price"] . " AND TestTable.teachingexperience >=...