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
UPLOAD IMAGES NOT WORKING!
Hi there i have a upload script in which it uploads the picture to a folder than creates two thumbna
PHP Upload issue
Hi guys,
I have stumble across an interesting issue with my script and is doing my head in.
image upload, resize THEN submit form
Ok so I have a form that requires the user to upload an image, and then do something with that image
(sub)screen resize modification doesn't work after ECC 6 EhP 4 installation
Hello,
We have previously extended the size of the custom data tab on PO transaction ME23
Random date selection
i want to select random date with time(hour+minutes+sec) where date is specified(10/22/2009) and tim
How to set pass login name from htaccess to php
When the user logs into my members page via htaccess, I'd like to retain the username so that I can
Executing an exe
Hi. I have some bizarre problem with exec (other any other method) to launch exe's. I am making a ga
PHP Surveys
I really would like some advice.
If you have a client come to you asking for a survey to be d
Passing PHP variables from one page to another
Hello-
I'm having trouble figuring out how to transport a variable from one php file to anoth
Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne