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.
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
Need a Timecode Class...
Not a Time Stamp, Time Code. Format is a bit different. HH:MM:SS:FF where FF is Frames. I dont re
Simple email form - Newbie
Hello all,
First time poster!
I've been asked to create a simple HTML form that submit
How to generate a text file using php...?
Hi,
Can anyone give me code to generate a text file using php
Thanks in advance
fwrite error
Hi All,
Does anyone know what is causing the error in this code?
Code: <?
$error
square instead of number
Hello
I do not know why but this code seems to work fine only in my xampp local insallation but n
Passing Variables
What I'm wanting to do is when the user clicks on Arenas it will know the name of the country it's w
Big O & time complexity ???
can you help me how to calculate the Big O & time complexity for any algorithm and c++ program pleas
Call Screen statement Error
Dear Experts,
is there any setting that needs to be done before creating any dialog progr
Need help with an email blocker for a guessbook
I am new with php and here is a simple guessbook page but I am being hit with spam from a group of t
Curl & sessions PLS HELP
Hello,
I have a problem with curl and sessions and i will try to explain the best i could.