Page with index.php?id=1
Hello,
I would like to know how to create pages like: index.php?id=1
with ID calls from the SQL database?
This would be to separate news on different pages.
News 1 would be on the page: index.php?id=1
News 2 would be on the page: index.php?id=2
News 3 would be on the page: index.php?id=3
...
Thanks in advance
Configuration: Windows 7 / Firefox 7.0.1
I would like to know how to create pages like: index.php?id=1
with ID calls from the SQL database?
This would be to separate news on different pages.
News 1 would be on the page: index.php?id=1
News 2 would be on the page: index.php?id=2
News 3 would be on the page: index.php?id=3
...
Thanks in advance
Configuration: Windows 7 / Firefox 7.0.1
2 answers
-
ContributorHello,
Indeed, the variables passed via the URL are called GET variables; they can be easily retrieved in PHP to incorporate them into SQL queries.
See here: https://openclassrooms.com/fr/courses/918836-concevez-votre-site-web-avec-php-et-mysql/912799-transmettez-des-donnees-avec-lurl
--
Mihawk
"As long as we don't do it, we don't know."