I need the PHP script to connect to my Joomla MySql database and then display some information on a page(Account Page) in the form of a table. I need only two tables accessed. One is jos_users and the other is jos_orders. As items are purchased in my store, the orders table is populated with the details of the order. In the other table, members of my site are given an auto increment member ID as they sign up through Joomla. My site is referral based and I already have the 'jos_users' table set up to assign a "referral ID" to every member that signs up, based on a link that was given to them from a friend etc. So, the 'jos_users' table has "member_ID" , "referral_ID" , "name" and a few other fields. The "member ID" also populates a column in the 'jos_orders' table as a member buys something. So, what I need done is this: Using standard Joomla authentication, when any member of my site are logged in, I need the code written to know that the person logged in is member number #234, let's say. I am using an MLM structure of payout, to five levels. So when #234 is logged in, I need to display on their "Account Page", the people they have referred to my site(using jos_users) and list in a table form, the purchases of these people. If #234 referred five people, the page would show the name of #234 and their purchase total, month to date and underneath that, in the table, the five people they referred(Level 1) and their purchase totals. Each of these five people would have a (+) plus sign that can be clicked and it would open(accordian style) to display the people they each referred(Level 2) and their purchase totals. Each of these subsequent people would have a (+) sign as well, but when clicked, it would not show all the names and purchases, just one line for the total amount. This would be Level three, as it relates to logged in member #234. Level four and five would be the same... a (+) sign by each name, but when clicked, only grand totals. Obviously, all of this would change dynamically when any given person is signed in and it would then display the appropriate people that this new logged in person directly referred and their subsequent people.
That is the basics. Any questions, please email me.
Thanks!