Creating a series of pages???
Moderator: General Moderators
Creating a series of pages???
What I want to know is how does a page such as article.php?id=1 then article.php?id=2 be created? Does it have to created manually or is there some code that creates each page?
maybe with
and then make your SQL query something like :
Code: Select all
if (isset($_GET['pid'])) {
$id = preg_replace('/[^a-zA-Z0-9\_]/', '', $_GET['pid']);
} else {
$id = '1';
}Code: Select all
" SELECT * FROM articles WHERE id='$id' "You can use the get method in your form tag
Or you can just insert it into a link
Code: Select all
<form method="get" action="page.pgp"><input type="hidden" name="id" value="1">Code: Select all
<a href="page.php?id=1>Something</a>