Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

New to php


  • Please log in to reply

#1
tgrigg

tgrigg

    Member

  • Member
  • PipPip
  • 11 posts
Hi im new to php and im building website for some one this the website addy http://www.timgrigg.co.uk/test

On the menu when you go to select any page i want the menu and header to stay, im wondering how i do this do i just copy all the index.php script and paste it in new php script and just change oage1body to page2body? or is there a easier way?

<html>
<head>
<title> Tim's Home Page </title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>

<body>
<?php
include ("head.html");
?>
<!-- Table for Main Body -->
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td valign="top" align="left" width="90">
<?php
include ("menu.html");
?>
</td>
<td width="1" bgcolor="lightskyblue" valign="top"> </td>
<td valign="top">

<?php
include ("page1body.html");
?>
<br> <br>
<?php
include ("menu.html");
?>
</td>
<td width="1" bgcolor="lightskyblue" valign="top"> </td>
</tr></table>

</body></html>


Edited by tgrigg, 15 November 2005 - 02:18 PM.

  • 0

Advertisements


#2
ditto

ditto

    - i pwn n00bs -

  • Member
  • PipPipPipPip
  • 1,260 posts
If you use frames/javascript you could keep the menu and header there and not have to reload that page. If you want to use php and want to use includes, then you could do:


For page1.php
<?php

include('header.html');
include('menu.html');

//Continue with html here
<tr>
	<td>Page Content for page1.html</td>
</tr>

include('footer.html');
?>


it saves you from having to type header and footers all over again

if you dont follow just let me know, ill try to explain it more clearly

Edited by ditto, 15 November 2005 - 02:38 PM.

  • 0

#3
tgrigg

tgrigg

    Member

  • Topic Starter
  • Member
  • PipPip
  • 11 posts
Cheers is there any good websites where you can learn javascript and any good website or forum php help?
  • 0

#4
ditto

ditto

    - i pwn n00bs -

  • Member
  • PipPipPipPip
  • 1,260 posts
Read the Manual
http://www.php.net/manual/en/

Reading the php manual is pretty easy. Start from the beginning and go through.

also, http://www.phpfreaks.com is a good resource

Edited by ditto, 16 November 2005 - 01:07 PM.

  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP