murphydesigns Posted April 24, 2010 Share Posted April 24, 2010 Hi There, I am a major noobie at PHP programming, and I am trying my best to get this car inventory script working properly for me. Here are the issues I am having: 1) When I enter values for the year and the price it keeps coming back to say there are no matches, which is not right 2) The search results are not in the same color as the previous search screen (when you hit submit they revert back to the black text, I need them in grey) Any help would be appreciated, I have looked through the PHP, and MYSQL books I have but I am not sure how to integrate what I have read into the exisiting code. Below is the search.html file: <!--S:Search--> <script language="JAVAScript" > function Model(newmodel) { var models = new Array(); {SCRIPT} for (var i = document.forms[0].model.options.length ; i >= 0 ; i--) document.forms[0].model.options = null; if (newmodel == "" ) return ""; //adding the new values; for (var i = 1 ; i < models[newmodel].length ; i++) document.forms[0].model.options[i-1] = models[newmodel]; } </script> <style type="text/css"> <!-- .fontcolor { color: #C0C0C0; } body,td,th { color: #CCC; } body { background-color: #000; } .fontcolor { color: #C0C0C0; } --> </style> <body bgcolor="#000000" text="#CCCCCC" class="fontcolor"><form action="search.php" method="get"> <table align=center> <tr> <td><span class="fontcolor">Make & Model</span></td> <td><span class="fontcolor">{MAKE} & {MODEL}</span></td> <tr> <td><span class="fontcolor">Price range:</span></td> <td><span class="fontcolor">FROM: $ <input type="text" name="pf" value="{PF}" size="5"> TO: $<input type="text" name="pt" value="{PT}" size="5"> </span></td> </tr> <tr> <td><span class="fontcolor">Year range:</span></td> <td><span class="fontcolor">FROM: <input type="text" name="yf" value="{YF}" size="5"> TO: <input type="text" name="yt" value="{YT}" size="5"> </span></td> </tr> <tr> <td align=center colspan=2><span class="fontcolor"> <input type="submit"> </span></td> </tr> </table> </form> <!--E:Search--> <!--S:Select--> <select name="{NAME}" onChange="{ONCHANGE}"> <option value="">[ select ]</option> {OPTIONS} </select> <!--E:Select--> <!--S:SelectOption--> <option {SELECTED} value="{VALUE}">{NAME}</option> <!--E:SelectOption--> Here is the search.php code: <?php require "config.php"; $_PAGE = "index"; $_GET["sub"] = "search"; $site = new CSite("admin/site.xml"); $site->Run(); ?> Thank you in advance, I promise this is my last issue with this script. Quote Link to comment https://forums.phpfreaks.com/topic/199629-having-issues-with-a-search-script/ Share on other sites More sharing options...
murphydesigns Posted April 25, 2010 Author Share Posted April 25, 2010 Any ideas out there??? Quote Link to comment https://forums.phpfreaks.com/topic/199629-having-issues-with-a-search-script/#findComment-1047989 Share on other sites More sharing options...
murphydesigns Posted April 25, 2010 Author Share Posted April 25, 2010 Where can I define the YF and YT values? Quote Link to comment https://forums.phpfreaks.com/topic/199629-having-issues-with-a-search-script/#findComment-1048257 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.