problems with search form numerical "between" sending by php


Posted on 16th Feb 2014 07:03 pm by admin

I am trying to display the results of a search, on a sql database, on a web page. I set up html "select form" and set value to "Between x and x" I get a resource error when submitting the form. I works ok when using "LIKE" or "<" but I cannot get a between to work.
The purpose for this is to allow a custormer to search a vehicle inventory by prices between set points.
The HTML page the form is <a href="http://www.docwilsonsauto.com/index.html">here</a> there is no php on this page so just view the source.

Did you know?Explore Trending and Topic pages for more stories like this.
Here is the code from the .PHP
And thank you for reading this I am stumped on why this will not work. The other searches I made work great.


<?php
$con = mysql_connect("***********.***.*****","********","******");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("docwilson", $con);

$result = mysql_query("SELECT *
FROM `Inventory`
WHERE `Selling Price`('$_POST[search1]')");

while($row = mysql_fetch_array($result))
{
echo $row ['Stock Number'] . " " . $row['Make']." " . $row['Model']." " . $row['Color']." ". $row['Miles']." ". $row['Selling Price'];
echo "<br />";
}

mysql_close($con)
?>
No comments posted yet

Your Answer:

Login to answer
79 Like 7 Dislike
Previous forums Next forums
Other forums

Give me all your tricks for minimizing jar file size

Hi, I'm coming close to releasing my J2ME game... I am kicking up against the 64k size barrier w

PHP Captcha Error help - replace the "die" command
Hi All,

I am after a bit of help with a Captcha spam protection box.

The site gave me

Probably Easy, Need help with Check Boxes in PHP Code
hello,

Thanks for looking this over and helping me out. My problem is I have a online store l

Why is this query failing?
Why is this not working?
$query = "SELECT * FROM `users` WHERE `userid` = " . $USERID

Any decent php formatter/beautifier/pretty printer?
Any decent php formatter/beautifier/pretty printer class/function?

I found the following whil

script is pulling more then they have....
I have this script for my game where they can change there race. This will cost them 2,500 points. H

reorder sql query
ok so i have this very simple code:
Code: $query = "SELECT search_keywords, COUNT(search_key

How To Make More Than One Redirection with PHP on the same page?
Hey im trying to do a direction page where it open differently link direction pages every time som

$_POST variable un-useable
I'm trying to use a $_POST variable in a mysql update statement but i can't use it for some unknown

Motivational Posters
Hello,

I wonder how can i do them in php. Are there any sample codes that you can show me?

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash