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

COde for a Cc
I'm not receiving $ft as a Cc. Why is that??

$to = "$email";
$headers = "Fr

PHP IMAGE UPLOAD SCRIPT
Hi for the last week i have been looking for scripts that will upload a photo to a certain folder wh

getting rid of quotes in strings
sick of trying to deal with them in multiple ways (entering in and taking from database, echoing, ec

defining website tags
Hi,

What would be the best way to define tags for my site, such as website title, url etc.

Bar charts using Graphical Framework.
I am using Graphical Frameworks(GFW) to create a chart Graphic . There is no problem with the data d

division gives infinity anser
int main()
{
int z=0;
int i=1/z;
cout<
}

It doesn't throw a

Text Not Displaying Correctly With PHP:GD
I recently moved servers and since then I have noticed that one line of text is showing weirdly.

MySQL Does not UPDATE- SQLString Problem
vb Syntax (Toggle Plain Text) 1. SQL = "UPDATE sampletable SET column1 = 'C1sample1'"

When file included, REMOTE_ADDR is server's?
I have an index file that handles my site, basically index.php?page=ip will activate "require('

Can I use a loop
Hi buddies!

Once again with my doubts here.

Right now I am using this sql stat

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