Jump to content

Welcome to Geeks to Go - Register now for FREE

Geeks To Go is a helpful hub, where thousands of volunteer geeks quickly serve friendly answers and support. Check out the forums and get free advice from the experts. Register now to gain access to all of our features, it's FREE and only takes one minute. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more.

Create Account How it Works
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