unknown101 Posted April 18, 2008 Share Posted April 18, 2008 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 More sharing options...
unidox Posted April 18, 2008 Share Posted April 18, 2008 You could use mod_rewrite Link to comment https://forums.phpfreaks.com/topic/101718-solved-dynamically-create-new-pages/#findComment-520425 Share on other sites More sharing options...
unknown101 Posted April 18, 2008 Author Share Posted April 18, 2008 What other approaches possible? Any sample code or tutorials would be a great help! Many thanks Link to comment https://forums.phpfreaks.com/topic/101718-solved-dynamically-create-new-pages/#findComment-520431 Share on other sites More sharing options...
unidox Posted April 18, 2008 Share Posted April 18, 2008 Google, or you can use GET index.php?page=userid Link to comment https://forums.phpfreaks.com/topic/101718-solved-dynamically-create-new-pages/#findComment-520461 Share on other sites More sharing options...
Fadion Posted April 18, 2008 Share Posted April 18, 2008 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']; ?> Link to comment https://forums.phpfreaks.com/topic/101718-solved-dynamically-create-new-pages/#findComment-520466 Share on other sites More sharing options...
unknown101 Posted April 18, 2008 Author Share Posted April 18, 2008 Thanks for the help guys.. using $_GET seems to have done the job nicely. Link to comment https://forums.phpfreaks.com/topic/101718-solved-dynamically-create-new-pages/#findComment-520471 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.