Jump to content

Having Issues with a search script


murphydesigns

Recommended Posts

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.