jaguarr Posted December 28, 2007 Share Posted December 28, 2007 It's to my understanding that you don't have to have all the webpages stored on your servers. There are pages that are generated dynamically and you can link to it with a question mark after "php". For example, if you go to google.com and do a search, the result page url will have a question mark, like this: http://www.google.com/search?hl=en&q=test&btnG=Google+Search How does this work? An example would be really helpful. Thanks a lot. Quote Link to comment https://forums.phpfreaks.com/topic/83437-how-do-i-generate-page-with-php/ Share on other sites More sharing options...
emehrkay Posted December 28, 2007 Share Posted December 28, 2007 What dynamic pages usually do is take those variables from the url using the $_GET superglobal. If you have page.php?var=3, you do $_GET['var'] to get 3 and you run that through your DB to generate the data for the page. It is pretty simple once you understand the basic idea. website.com/page.php?user=jaguaar SELECT * FROM user WHERE user_name = $_GET['user'] //dont ever do this, but here is an example of how you can use it Quote Link to comment https://forums.phpfreaks.com/topic/83437-how-do-i-generate-page-with-php/#findComment-424490 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.