Ok, Thanks to your links I have officially connected to mySQL and executed my first search query.
I obviously have a long way to go but I have a couple simple questions:
This obviously just echo's Results if someone performs a search...
Code:
if ($searching =="yes")
{
echo "<h2>Results</h2><p>";
This displays "You forgot to enter a search term" if nothing is entered..
Code:
if ($find == "")
{
echo "<p>You forgot to enter a search term";
exit;
}
These are filters to strip SQL for HTML ?
Code:
$find = strtoupper($find);
$find = strip_tags($find);
$find = trim ($find);
This query give me the same 21 results no matter what I type?
Code:
$data = mysql_query("SELECT * FROM homes WHERE upper($field) LIKE'%$pr%' ");
Any suggestions on a simple work around that may narrow the search results based on zip codes? or numbers? I have 21 fields with different zip codes and addresses.
Should I change upper($field) LIKE'%$pr%' to something more defined?
...
__________________
Man... IE stinks ... and If I get one more contingency offer!!! **Sydpixel**
Last edited by Sydpix : 06-19-2007 at 08:46 PM.
|