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
Code error with Index.php
Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runevid/public_
Problem with a select distinct
I have a problema with a select distinct, I have the next sql:
select distinct a,b,c,d fr
MySQL noob question
hi guys
I have a simple mysql table set up, along the lines of
Col 1 - Col 2 - Date_l
how do I show what a user have selected from a checkbox?
From my code below, how would i show which check boxes have been checked and which radio buttons sel
Check premium expire
Hi,
I am making a simple file hosting site and want to check if users premium subscriptions h
VAT
how should I deal with VAT?
if I have a product that costs £5.00 and VAT @ 17.5% (£0.87
values in array being escaped
I would like to submit some values - back to the same form for checking before processing...
Xacute search within SQL results
I have a query that is pulling data, and I want to return a specific value from the results of that
Move array index to end
Hey guys,
Quick question:
I have an array that looks like this:
Code: [Select]$var =
links using header()
Hi All
I'm not sure where to ask for help on this but I hope someone can offer some. I'm at