Submit Your Article Forum Rules

Results 1 to 2 of 2

Thread: stocked in making double dynamic dependent select lis in php

  1. #1
    Junior Member
    Join Date
    Jun 2009
    Posts
    0

    stocked in making double dynamic dependent select lis in php

    hello guys;
    I have read and watched and tried 2 million times to create the same thing that is in the tutorials in "Dynamic populating the drop down list based on the selected value of first list" but when I want to change it to my own website and convert it the way that works with my website I get stocked and it doesn't work!
    I have 2 tables in mysql database; one is """car_names""" which contains the brand of the cars like: BENZ, BMW, NISSAN, HONDA, ...... and this table has 4 rows as below: :
    1=> id
    2=> menu_name
    3=> position
    4=> visible
    the second table is """car_models""" which contains the type of the cars related to the first table like: 220E, 330E, civic, accord, sunny, .... and this table has 5 rows as below:
    1=> id
    2=> carname_id
    3=> menu_name
    4=> position
    5=> visible
    As I have created my web page in php I have 2 dropdown select lists that if you choose any car from the first list it works perfectly and brings me all the car's names from the first table from the database>>> menu_name's row. BUT if I choose for example HONDA from the first list the second list still remains empty. I have tried to change the code the I have downloaded from Dynamic populating the drop down list based on the selected value of first list and replace it with mine in or exchange some parts with my code but it didn't work!
    I will really appreciate your helps and comments.
    Please help me to get this code work for my website, it has been a headache for me about 2 months already!
    I don't know how to upload the files here in this website but if you need I can send you the mypage with mysql database files for you.

  2. #2
    Senior Member fulleffect's Avatar
    Join Date
    Jun 2008
    Posts
    115

    Re: stocked in making double dynamic dependent select lis in php

    I like to do things differently, as my parole officer will testify.

    HTML Code:
    <select id="selectCar" onchange="location.href=document.getElementById('selectCar').value">
    <option>Select Car Make</option>
    <option value="http://www.domain.co.uk/cars.php?carname_id=48">Ford</option>
    <option value="http://www.domain.co.uk/cars.php?carname_id=56">Honda</option>
    </select>

    HTML Code:
    <select id="selectModel" onchange="location.href=document.getElementById('selectModel').value">
    <option>Select Car Model</option>
    <option value="http://www.domain.co.uk/cars.php?carname_id=56&carmodel_id=01">220E</option>
    <option value="http://www.domain.co.uk/cars.php?carname_id=56&carmodel_id=02">330E</option>
    </select>

    Needs php code adding in their, to do your selected="selected", and narrow down ur list of models.

Similar Threads

  1. Are ecommerce sales taxes dependent on the server's location?
    By Calius in forum eCommerce Discussion Forum
    Replies: 39
    Last Post: 02-11-2009, 06:39 PM
  2. Is Search Engine ranking loaction dependent
    By iany in forum Search Engine Optimization Forum
    Replies: 5
    Last Post: 07-30-2008, 05:29 PM
  3. double website files - double content
    By JuniorOnline in forum Search Engine Optimization Forum
    Replies: 2
    Last Post: 08-09-2005, 10:55 AM
  4. Making Dynamic Web Site Se Friendly
    By AjiNIMC in forum Web Programming Discussion Forum
    Replies: 5
    Last Post: 10-26-2004, 11:42 AM
  5. Help:Making dynamic pages search engine friendly
    By megame in forum Search Engine Optimization Forum
    Replies: 4
    Last Post: 09-07-2004, 04:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •