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
Session
I am having a little trouble with a session. Not sure if it is my browser or what. I know I do not
breaking a text file into paragraphs based on strings
I have a text file of email addresses that is all squished together. It looks like this:
abc
Echoing ASCII code
I have a php page that splits a string into chars and then echoes the ASCII code for each char. I'm
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
is_dir() problem
Hello,
I'm buidling a php scripts that dynamically get's subfolders from a specific folder.
$variable $variables type question
I need to be able to designate an array element dynamically, so I thought to use a variable variable
Load Animated Image while cache is serve
I have a page that loads up using cache and took about 1 to 2 minutes before it loads to the page. <
Not adding to db
Hi, I can't figure out why it won't add the record to the database. It's just a simple form to get
form submit at godaddy?
Trying to test form submission at GoDaddy and it does not seem to work. Here's the page...
h
Email to a friend script problems
I have this send-to-a-friend script with 2 issues:
1) When you open the form popup on a p