We currently have a website that replicates for our users when they sign up. At the time of signup they are linked in the mySQL database with a parent/child relationship with their referrer. The database hierarchy is linked through the �member id�.
Our members also have multiple custom fields to use in personalizing their own replicating website (also stored in the same mySQL database).
The public web pages then use custom tags that query the mySQL database and display the member�s personalized information. This information is determined by the member�s �username� displayed in the website affiliate url.
We can also display their referrer�s information on the web pages using the �left join� function and �sponsor� personalization tags.
The public web pages are stored in a folder named �template�. At the current time, the web pages are all .htm but can be converted to .php if needed.
Here�s what we need:
When someone visits the member�s website and the member has empty customization fields in their profile, we want the script to query up the hierarchy (as many levels as it takes) to find the next available �parent� whose field is NOT null (empty). We then want that information to display on the website of the original member.
We want this to work for current custom fields as well as fields we may add in the future.