benh13
July 21st, 2009, 04:03 PM
I have made a form in php, and want to use a form to get a php file to display all values in a certain price range.
however when i open it up, it comes up with the error message
Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/test php 2.php on line 13
the code for the bit that is causing trouble is
mysql_select_db("examples", $con);
$result = mysql_query("SELECT * FROM guitar
while($row = mysql_fetch_array($result))
{
echo $row['make'] . " " . $row['price'];
echo "<br/>";
}
mysql_close($con);
line 13 is the bit that says
WHERE price<='$_POST["maximum price"]'");
if anybody can help it would be great.
however when i open it up, it comes up with the error message
Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in /var/www/test php 2.php on line 13
the code for the bit that is causing trouble is
mysql_select_db("examples", $con);
$result = mysql_query("SELECT * FROM guitar
while($row = mysql_fetch_array($result))
{
echo $row['make'] . " " . $row['price'];
echo "<br/>";
}
mysql_close($con);
line 13 is the bit that says
WHERE price<='$_POST["maximum price"]'");
if anybody can help it would be great.