I am trying to set up a website that would have a database full of companies and related information (ie name, country, website, description, etc), with the related information submitted to a database and stored.
I think there are two major options that I have for the individual pages that will represent each company:
1.) When the entity is first submitted by a user, use file_put_contents() to create a new web page for that entity. Insert the current variables (at that time) into the code for that webpage. This way there will be a webpage that is readable by crawlers for SEO purposes... I want to make sure that the individual entity pages will show up on Google and other search engines.
The problem with this method is that it will be more difficult to have the user dynamically make a change to the entity's related info. It would still be possible but I would have to use PHP to let them re-submit the information and then replace the old information in the HTML with the new information (as well as updating those variables within the MySQL database).
2.) Have a template already set up and when a new entity is submitted by a user, only submit the variables to a MySQL database and when a user wants to view the page for that entity, insert the variables into the webpage for the entity.
The problem with this method is that I believe it may cause problems for rankings when it comes to Search Engine Optimization. Entity name, country, website, and description are just a few very *necessary* variables that I can think of and there will be plenty more BUT I have read that having more than 3 PHP variables causes your page ranking to go down. Plus how would a search engine crawl a dynamically-created webpage? Does it have access to the MySQL database variables or would it enter that page by continuing from a preceding href link?
Am I totally thinking about this the wrong way? How do very popular sites like Wikipedia, Amazon, and IMDb apparently have so many pages that can still be indexed by search engines? I notice that Wikipedia and IMDb tend not to have *file names* at at the end of the URL's for the individual pages (articles and movies / individuals), so what method do you believe they use? Would a comparable method even be reasonable for a smaller website looking to eventually scale up (god willing)?