TehChikenHater Posted July 15, 2012 Share Posted July 15, 2012 Hiya folks! I was creating my website, when I sorta ran into a problem of spacing, and decided to go through a more retrievable route. So, I have members for my site, but, I currently use a template, and create a new webpage for every registered user, which takes a while to do on my server, and takes up quite a lot of space. So, I was wondering, how could I do something where I just take a BUNCH of data from my MySQL database, and place it onto the a template page. Well, I do know how to do that, but how can I do that for all users? Example; www.MyUrl.com/User=TehChikenHater That way, it'll read the URL, find "TehChikenHater" in my MySQL database, and then push all of his data onto my template page, which would display the data. Any help would be thankful. -TehChikenHater Quote Link to comment https://forums.phpfreaks.com/topic/265710-url-adressing/ Share on other sites More sharing options...
xyph Posted July 15, 2012 Share Posted July 15, 2012 $query = "SELECT data FROM users WHERE username = '" . mysql_escape_string($_GET['User']) . "'"; Quote Link to comment https://forums.phpfreaks.com/topic/265710-url-adressing/#findComment-1361712 Share on other sites More sharing options...
ManiacDan Posted July 16, 2012 Share Posted July 16, 2012 This is...pretty much the entire purpose of PHP. The direct answer to "how do I do this" is "use PHP." You don't need a templating language or anything, just take the query xyph gave you and start dumping the data out to the screen, performing more queries as necessary. Quote Link to comment https://forums.phpfreaks.com/topic/265710-url-adressing/#findComment-1361888 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.