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
PHP and SMS
Hi all forum members. I am new here and am unsure what category shoild I post this in.
Moderator
Export hangs
Hi all, please help
I have a Oracle 10.2.0.3.0 database. When I want to query the dba_segmen
What do you call the "token" thing?
You know how some sites have links that run on tokens? Tokens are links that only stay alive for a c
array_combine() trouble w/csv file
I have a problem with a piece of code I wrote to import some records from a csv file into mysql. I h
Error when call dll from oracle
Hi all, please help me!
I have dll write C language, I want call it from oracle procedur
Multiple while loops
I have several DB queries that I know should be returning results and aren't. I have a feeling it ha
upload photo limits
ive got a upload photo script and im just trying to make more secure currently it limits size and as
Need help making a script that moves data into acrhive table
Hi,
I'm kinda new to php/mysql
And i wrote a simple script to store sales lead for a b
Need help adding a timestamp to my filename/variable
Hello,
I'm kind of stupid when it comes to php and I need a tiny bit of help. I've got a f
need help in php variable
i have a php variable on one page
Code: [Select]$lastId = mysql_insert_id($db);
echo $lastId;<