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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.