Jump to content

PHP and HTML


Archadian

Recommended Posts

Can you give a very small specific example?

 

Are you referring to like using an include file?

 

If so you could create a file with the .html extension and then just put this code on each page where you wanted it...

 

<?php
//include page with all formatting
require_once "../../format.html";
?>

Link to comment
Share on other sites

include('templatefile.html')

or, I like the idea of having one index page and when they click on a link, it creates a URL variable and then u use that variable to decide what content to include. like

www.domain.com/?Page=Aboutus.php

then, have

$Page = "index.php"

if(isset($_GET['Page'])) { $Page = $_GET['Page']; }

include($Page)

 

Also, CSS is really handy for templates.

 

EDIT****** YOU WILL WANT MORE THAN THAT SCRIPT, SORRY... don't use what I just said. Someone can do some pretty bad stuff to your site if you use that...

but you can use similar techniques with a few more lines of code and be safe.

again sorry.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.