Retrieve information from custom tables with dropdown
-
Hi, I have a client that wants to record customer information accounting stats. I dont have a great deal of php experience but if guided can probably get it. I’ve searched for some sort of database plugin but nothing meets my requirementts and the documentation leaves me quite confused with where I specifically put the code.
I have two tables.
Table1
Customer Name, Customer Address, Custuomer contact etcetc
CastA,123 Road,Mr Man
CustB,45 Avenue,Mr JnesTable2
Customer , Year, Assets, Liabilities, Employees
CustA,2010,15000,16000,25
CustA,2011,16000,18000,66
CustA,2012,18000,19000,888
CustB,2010,500,900,55these will be linked on customer name – or id for instance
What I want is for a visitor to go to a page and have a dropdown on the page (which I cant find any code for) to choose from a list of the available customers from TableA. The page’s first section will retrieve the details from table one, and then underneath, row by row, I want the linked information from Table2
So output would be
Cust A
12 3Road
Mr ManyEAR: 2010
aSSETS: 15000
Liabiities 16000
Employess 25Year:2011
Assets:16000
Liabilities: 18000
Employees: 66Etc – for eah selection in the dropdown.
Could someone please guide me how this is achieved please – the main point being how to create a dropdown and pass the values to retiebe the other records for that selected custoer ? And where do I put this code?
Thankyou in advance for any advice, or for a plugin solution that already exists, Ive searched through many but not found a relevant solution, and yes it has to be done in wordpress as the site already exists.
- The topic ‘Retrieve information from custom tables with dropdown’ is closed to new replies.