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
7
Other forums
TemplatePower & AJAX
Hi all,
I'm currently implementing some AJAX features in my PHP-framework (which is b
Why doesn't this work? (SSH2)
This is my script:
Code: <?php
$connection = ssh2_connect('213.251.167.109', 22);
Need to write a cookie with a url var
Not sure if its possible, but I need to write a cookie with a url.
So this would write 2232 a
do while...woes
I'm sure this is childsplay but it is stumping me, everytime i try what I think would make this work
PHP - HTTP Digest Authentication - Understanding Code Help
Hi Everyone,
This is my first time on your website and please excuse if I am asking silly que
printing links
Hi every1
i am connecting to a table in sql and the looping through with a while ($ var = my
writing a screen scraper
Hello,
I'm writing a screen scraper application and want to be able to get absolute addresses
Not showing whole name with mail () script
I sent up a simple mail form with the PHP mail() script. One problem is when it sends an email with
convert PHP array to Javascript array
I have a page that gets a request sent from AJAX, and I am trying to convert a PHP array to a javasc
How to calculate days from variable date?
This will be easy for one of you gurus. I want to fetch the date from a variable date, for example:<