Hello friends,

I have a membership site where members will submit their data and choose a template to display their information. On this site, I want each member to have his own subdomain (eg membername.mysite.com) whereby anybody that enter the subdomain into the address bar will be directed to the template the person has chosen and the member's data will be collected from the database and displayed. A very good example is how articles that are summited are being view on WWW.BLOGSPOT.COM (eg myblog.blogspot.com)

Regards
adsegzy

Hello friends,

I have a membership site where members will submit their data and choose a template to display their information. On this site, I want each member to have his own subdomain (eg membername.mysite.com) whereby anybody that enter the subdomain into the address bar will be directed to the template the person has chosen and the member's data will be collected from the database and displayed. A very good example is how articles that are summited are being view on WWW.BLOGSPOT.COM (eg myblog.blogspot.com)

Regards
adsegzy

Just place a field in the database to hold the full subdomain (membersname.mysite.com), then query this on every page with $_SERVER; (this pulls out the domian name it was called from). From this you can get the members ID, and hence query the database again for the details.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.