Re: 100% dynamic php driven web pages??

From: Date: Sat, 03 May 2003 14:18:07 +0000
Subject: Re: 100% dynamic php driven web pages??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146270@lists.php.net to get a copy of this message
let's say you have two files -- my_CD_list.php is a list of CD's in your collection, for argument's sake... these could be got out of a database, or whatever. each cd title would be a link (show_CD.php)to show more details of that CD (track listing, catalogue number, cover scan, etc) -- my_CD_list.php -- The Beatles - <a href="show_CD?id=1">Yellow Submarine</a><br /> Helmet - <a href="show_CD?id=2">Betty</a><br /> Nine Inch Nails - <a href="show_CD?id=3">Remixes</a><br /> -------------------- ... show_CD.php could then show different content through a single template (one HTML design, one CSS design, one layout), based on the id=X in the URL... this id might work with images, include files, other HTML, or even poulling stuff out of a database: -- show_CD.php -- <? $sql = "SELECT * FROM my_cd_collection WHERE id={$_GET['id']}"; $res = mysql_query($sql); $row = mysql_fetch_array($res); echo "{$myrow['title']} by {$myrow['artist']}<br />"; echo "{$myrow['catnumber']} by {$myrow['year']}<br />"; <?include("tracklisting_{$_GET['id']}.txt")?><br /> <img src="images/cover_<?=$_GET['id']?>.jpg" /><br /> ?> ... so far that's only two files.... why do you need the 3rd? Justin on 03/05/03 4:16 PM, Prince (friendly@kaltelnet.net) wrote: > hi.. > > is it a good idea or should i say safe for me to create a php driver file that > will have say 100 links on it and ever one of those links will give vars to > the php source file and then the php source file processes them or whatever > and then give the results to a web page (html) to possibly create up to 100 > different pages out of only 3 files? > i have the 3 files: > main.php //the file with links on it > members_show.php //php file to process links from main.php > //members_show.htm //sthe page that will be used for the 100 page creation > > > the .html file is a template sort of thing so every page will have the same > format/css on it... > > or does anybody think it should be done different ? > >

« previous php.general (#146270) next »