aztec Posted November 21, 2006 Share Posted November 21, 2006 HelloI have a static page website that I am converting to a dynamic site. There are 560 pages and over 500 use the same template. All the information is included in each page, I can hear the groans from here but that was the only way I knew and it worked. Please forgive me I have now seen the light.I have a small test site running on the developement computer with Apache server, MySql and PHP5, the queries work.Being new to dynamic sites my question is. Do I have to create 560 pages each containing the style sheet and the query for each link on the page.It seems a waste to have a page loaded then having to reload the same page when all that is changing is 20 names from 3 tables in a database. Each of the names is a link to a different page at the moment.Is it possible to reset the containers on the display page and just make the link send a query or not.Gaining new knowledge also seems to create new problems to solve, but I will carry on.Kind Regards Link to comment https://forums.phpfreaks.com/topic/27975-dynamic-sites/ Share on other sites More sharing options...
taith Posted November 21, 2006 Share Posted November 21, 2006 page #1[code]$yourinfo = 'hi';require_once('template.php');[/code]then your template.php (customize liberally)[code]<table> <tr> <td><?=$yourinfo?></td> </tr></table>[/code] Link to comment https://forums.phpfreaks.com/topic/27975-dynamic-sites/#findComment-127969 Share on other sites More sharing options...
aztec Posted November 21, 2006 Author Share Posted November 21, 2006 Thank you very much taith for your quick responce, I can't say that I understand it completely but I am assuming that it means I can send queries without reloading the complete page.Regards Link to comment https://forums.phpfreaks.com/topic/27975-dynamic-sites/#findComment-127989 Share on other sites More sharing options...
TEENFRONT Posted November 21, 2006 Share Posted November 21, 2006 yes try something like this<a href="names.php?name=$name">name</a> in your list of names page.then on the names actual page use $name = $_GET['name']; to grab the name var and stuff it into your results query. Link to comment https://forums.phpfreaks.com/topic/27975-dynamic-sites/#findComment-128002 Share on other sites More sharing options...
taith Posted November 21, 2006 Share Posted November 21, 2006 no... what it means is that you can connect more then one page, to the same template/css...once you have your template.php set... you can havepage1.php[code]$yourinfo = '<a href="page2.php">Page 2</a>';require_once('template.php');[/code]page2.php[code]$yourinfo = '<a href="page1.php">Page 1</a>';require_once('template.php');[/code]that way you have the one big template page, and the rest are all tiny... :-) Link to comment https://forums.phpfreaks.com/topic/27975-dynamic-sites/#findComment-128014 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.