1. i'm sure this is something simple, but i usually only USE javascript, i don't usually code it :)

    let me try and explain my need ...

    i have this url:


    this displays ALL cellphones in the database (the xyz123 is a keyword specific to cellphones). when users click on the manufacturer links on the page, it adds them to the search string, so if they picked MOTOROLA, the url would then read:


    and it would then only display motorola phones. this works fine, as each link hard coded for each manufacturer. the issue comes when they chose the TECHNOLOGY. the click needs to add the technology keyword to the search string, keeping the current string intact. so if they've picked motorola phones, then want to see only CDMA phones, the address bar needs to say:


    i have a javascript that would accomplish that, HOWEVER, the problem then becomes, if they click on GSM, it will just add THAT to the string, and they will get NO results, as it would be looking for motorola phones that are both GSM and CDMA (as far as i know this doesn't exist).

    so basically, my TECHNOLOGY links need to CHECK to see if the other technology is listed in the search string, and if it IS, needs to REPLACE it with the opposite (we are only focusing on GSM and CDMA), and if it ISN'T there, it just needs to add the selected Tech.

    did i make ANY sense?

    please don't judge my website too harshly, it's a work in progress :)
  2. Conrad10781

    Conrad10781 New Member

    Feb 26, 2005
    Likes Received:
    New York
    I am more of a php/mysql guy, but what I don't understand is why you are using javascript to make those url's, maybe I am missing how the backend is working, but my main question is it seems like you are going to take the keyword and just plug it into some sort of a database query IE "Select * from cellphones WHERE $keyword"; The only thing I don't understand and again maybe because of my lack of knowledge on CGI, but that string doesn't look like it could full fill a query, unless there is something seperating them in the back.

    Wouldn't you need a query like

    "Select * from cellphones WHERE make = motorola AND technology = CDMA"; etc?

Share This Page