$min_range=$_GET['min_range'];
$max_range=$_GET['max_range'];
$brand_name=$_GET['brand'];
$result=mysql_query(
"
SELECT
brand,
image,
price
FROM
mobile
WHERE
brand = '"$brand_name " 'price =3000
"
);
I want to use php variable in my sql query . What is wrong with this code. and how it can be corrected.
it is saying "parse error:syntax error,unexpect('$brand_name')"
mysqldriver is deprecated. You should read up on MySQLi or PDO. Also, it will be a good idea to read up on prepared statements.