Jump to content

Erica McLane

Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Erica McLane's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have the following MySQL tables: Categories CategoryID VARCHAR 30; CategoryName VARCHAR 30; ------------------------------------------- Books BookID VARCHAR 20; CategoryID VARCHAR 30; BookName VARCHAR 50; I want to put them on a table (HTML formated). There will be two columnts - one for \'CategoryName\' and one for \'BookName\'. The left column should be filled with the contents of \'CategoryName\' like this: --------------- |Adventure| --------------- |Comic | or whatever is in the MySQL table. In the second column I want a drop-down style listboxes filled with the contents of \'BookName\'. The listboxes should be exactly the same number as the Categories. (i.e. One listbox (filled with the BookName contents that match the CategoryName field) in the row of the Adventure category. So, my question is \"How to get the contents of the BookName fields that have the same CategoryID (in Books) number as the category Adventure in CategoryName which will have CategoryID 1. Here is a table: Categories ---------------------- CategoryID | CategoryName 1 | Adventure 2 | Comic 3 | Horror Books ----------------------------------------------- BookID | CategoryID |BookName 1 | 1 | AdventureBook 2 | 1 | Another Adv. Book 3 | 2 | Asterix So, depending on the CategoriID value I want to fill the apropriate listbox with the corresponding values. In the page where Adventure lies the checkbox should have AdventureBook and Another Adv. Book. Got the idea? Can you help me? Thanks in advance?
  2. How to do this? I have a table, simmilar to this: Tablename Test. ID | Title | Text 1 | One | Test1 2 | Two | Test2 3 | Three | Test3 4 | Four | Test4 5 | Five | Test5 I filled one drop-down listbox with the values in Title. Now I need this - the script should display the \'Text\' value, depending on the selected \'Title\' in the SAME PAGE, when the user selects the \'Title\" in the listbox. Is there a way to do this? Thanks in advance! Example: There is a listbox and the user selects \'Two\'. Now the script should display \"Test2\".
×
×
  • 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.