MySQL Forums
Forum List  »  PHP

Using user input in mysql SELECT statement
Posted by: Joe Manor
Date: October 08, 2015 05:29PM

I need to replace the values of iso_region and municipality with variable entered by the user such as:


$state = $_REQUEST['states'];
for iso_region
$city = $_REQUEST['city'];
for municipality

How can I do that?

Any help will be appreciated.


$sql = "SELECT* FROM small_airport WHERE iso_region = 'us-nj' AND municipality = 'newark' and type<>'heliport' ";

Options: ReplyQuote


Subject
Written By
Posted
Using user input in mysql SELECT statement
October 08, 2015 05:29PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.