Jump to content

search


spearchilduser

Recommended Posts

Hi im just querying im tryign to do a simple search on my database and set it so it searches between two price values from a drop down box

 

html>
<body>
<form action="bedroomsearch.php" method="POST" >

Price:								
		<select name="Price">
                            <option> 100-300</option>
						<option> 200-500</option>
						<option> 400-700</option>
						<option> 600-900</option>
						<option> 900+ </option>
								</select>
								</br></br>	



</br></br>	
<p><input type="submit" value="Send Details" name="TypeSubmit"></p>

</form>

 

$query = "SELECT * FROM properties WHERE Price ='".$_POST['Price']."'";
$result = mysql_query($query);

 

That is the query id use to search for the prices how do i do it so i can search for all the entries between the two values in the drop box?

Link to comment
https://forums.phpfreaks.com/topic/254796-search/
Share on other sites

Im sorry im new to php im not sure how i woudl lay it out is there anywhere where i could get the layout for the expression at all ?

 

and also if i wanted to be able to do say 3 things to search on would that all go into one query ?

and if so in my while statement to gather the information for the results what would i need to put into it so it expects more than one criteria

 

while ($row = mysql_fetch_array($result))

 

so after the $result

Link to comment
https://forums.phpfreaks.com/topic/254796-search/#findComment-1306463
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.