Page 1 of 1
PHP/HTML Programmers How Do I Create Html Pages Dynamically?
Posted: Fri Sep 28, 2007 1:53 am
by robinhood
Hi
At the moment I get my data for my WebPages from simple html files that I have to, cut and paste there title, body sections into my template file which has all my custom look and feel for my website. So the files get created automatically based on there title and I don't have to cut and paste the title and body of the simple html page into a
free templates, and name it manually. Any scripts out there.
Thank
Posted: Fri Sep 28, 2007 2:07 am
by os64dev
This isn't just solvable by scripts. Learn Javascript, DOM, PHP and MySQL and then you can do anything, though you need to design first.
For instance changing the title will be in DOM document.title = 'new title'; in PHP you would generate the <TITLE>/<TITLE> thingy in the head section. PHP on the other hand works on a webserver and DOM at the client. See, the complication starts... were to put/do what on the server side or on the client side.
This is all fun... ofcourse but takes a lot of time.
Posted: Fri Sep 28, 2007 2:07 am
by AndrewAPrice
Place your header/footer (along with all styling info) into separate pages.
Then you can either:
- Place your header/footer into a frame (don't do this unless you want a pre-2000-ish look for your site).
- Use Javascript to include the header before your content, and the footer after.
- Find out what server side language your webhost supports (most likely ASP.net (Windows server) or PHP (non-Windows server)). Then use PHP/ASP.net to include your header/footer (the easiest and my recommended way).
- Use a WYSIWYG HTML editor that supports dynamic content and will automatically insert and update your header/footer for you on each page. Expression Web comes to mind.
Posted: Fri Sep 28, 2007 2:18 am
by AndrewAPrice
os64dev wrote:See, the complication starts... were to put/do what on the server side or on the client side.
For a static page, it's best to put everything server side for several reasons. For dynamic content (real-time counters, etc) then you need to use client side.
Posted: Fri Sep 28, 2007 7:35 pm
by niteice
Am I the only person that thinks that OP sounds rather fishy, given the link to what appears to be a somewhat shady web design firm?