Jump to content

[SOLVED] Dynamically create new pages


unknown101

Recommended Posts

 

Hello guys,

 

Ive created a basic site whereby a user search is carried out giving the main results.  Along with each of the results returned I need to have a "More" option with each one, so basically if this is clicked a page loads just for that result and further information is given about it.  Each of the returned results has a unique ID which i could use to create a new page about it i.e.  www.domain.com/ID_Number

 

How do I go about doing this?

 

Any help or suggestions appreciated

 

Link to comment
https://forums.phpfreaks.com/topic/101718-solved-dynamically-create-new-pages/
Share on other sites

Just to give a basic idea. U make the link as "index.php?id=xx" where xx is the article id. Supposing u retrieve the articles from the database:

 

<?php
$id = $_GET['id'];
$resultsText = mysql_query("SELECT * FROM articles WHERE id=$id");
$valuesText = mysql_fetch_array($resultsText);
echo $valuesText['text'];
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.