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 Like 7 Dislike
Previous forums Next forums
Other forums

how to easy edit text, with box? Help.
Hi.
I have a little problem. I'm doing a webpage for my aunt and I would like to make it as easy

CODE NOT WORKING
Code: [Select]<?php
//include shared codes

include '../lib/common.php';
include

Limiting uploaded file type
I am working on a simple upload script, and I need it to limit the allowed file type that is uploade

php require help needed
Ok i tried to use the search funtion but the word require is everywhere.

i'm really new to cr

problem with php mysql query
Hi guy's...

I'm totally lost here..because don't have any idea how to make a query for grab r

How to sum these output values
Hi

I need sum the month totals
SELECT region_name, area_name ,SUM (CASE WHEN S

Help with file_get_html
The following code gives the expected results:

<html>
<head&g

regex for quoted text within a string
I am still getting the hang of regex expressions, but I cant seem to figure out how I would escape q

search query in mysql in php problem
my search query wont work, i know, that my codes are correct.please help

Code: [Select]&l

Creating Images from images in PHP
Okay well I am trying to make a 'dynamic' calender image with PHP.

I have images like this:

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