Reputation: 3
I have a database in MySQL with info of different places. I want to create a profile page in PHP for each one of those places but there is a lot of them (more than 5000).
So if i do that manually it'll take me a lifetime!. What I did is, created a template that is working just fine (is retrieving the data from the data base perfectly). The only problem is that I want a profile for all of the places and what I have to do now is to copy that template, go inside that copy and change a variable (ID) so it became the profile of another place. Is there any way to do this automatically (create the copy, go inside change the (ID), and save that with another name I.E. $nombre_lugar
?
Thanks.
Upvotes: 0
Views: 51
Reputation:
Don't set the variable inside the page, set it as a query string
yourpage.php?place_id=x
and inside your page
$place_id = $_GET['place_id'];
Upvotes: 2