Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    4

    Arrow Unanswered: HELP with website

    hello I have a problem with a dynamically generated form like:

    [drop down menu][text][text][text] , [text][text][text]
    [drop down menu][text][text][text]

    and the amount of rows are defined by the amount in the database
    and also by the fact that they are unique" if they arent a new
    [text][text][text] is put next to the similar row

    here is how it is
    in database

    | A_ID | A_NAME| B | C | D |

    AND WHEN IN FORM

    [A_name][B][C][D] , [B][C][D]
    [A_name][B][C][D] ,

    if the A_NAME is the same the B,C,D are grouped after using the same A_NAME

    the problem I am having is I want to pass it to another page to update the rows in the database but by changing the first dropdown I want to affect all the rows that are without name,
    I cannot just pass the a_name in a hidden field since the first part must change all the following

    all I have now is passing variables like $VAR_A_NAME-1_2
    the first number is the row identifier and the second is put on all the variables including A_NAME and they are grouped like that

    anyway if you have a better way of doing this without so much string manipulation please let me know
    thanks alot Derek

  2. #2
    Join Date
    Mar 2004
    Posts
    17

    Smile

    you can create a javascript for that. for example...
    eg.
    Country: United States
    then it should only display the appropriate states for that excluding states from other country.
    eg.
    States: Alabama, Texas etc.
    if you don't want to use javascript... use php
    in that case, you should use 3 forms for that and 3 tables
    for the first table, it should contain the infor about the "country"

    table country
    countid, countryname

    2nd table
    table city
    citid, citname

    3rd table
    table countrycity
    countcitid, citid, countid

    for the first page:
    select * from country

    for the second page:
    using the countid, selected from country
    select * from countrycity where countid is whatever...

    once you got the cid...
    select * from city where cid is whatever...

    third page:
    submit your data to database thru select or insert.

    **note: you can use hidden fields or sessions when moving your countid to the third page.

    hope this helps...

Posting Permissions

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