Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello, i wanted to know how to load a webpage into a cell of a table using php? I know i can use the iframe in HTML, but i wantedc to be able to to it dynamically. Example:
<table>
<tr>
<td>navigation panel</td>
</tr>
<tr>
<td>content panel - dynamic</td>
</tr>
</table>Since all pages will use the same header and navigation i wanted a way to just change the content panel. I also am using CSS, may help.

here're 2 sample files, hopefully this can make things clear:
<html>
<body>
<table>
<tr>
<td>navigation panel</td>
</tr>
<tr>
<td><?php include ("somefile.php"); ?></td>
</tr>
</table>
</body>
</html>let's say the above is called: index.php
now this one:
<strong>Welcome</strong>
<br>
<br>
Welcome to the siteis saved as: somefile.php
now when you call index.php, and viewed the source (from browser), there'll be a single html page, single table, 2 rows, with content of somefile.php as the 2nd row's content...
you can of course create many "somefiles.php" to create multiple pages with the same body, table and td layout, only the 2nd row content are different (depends on the included file)...
you can also do something like this in the index.php
include ($_GET['page']);
so typing: http://site.com?page=somefile.php will call up the file...
another similar tutorial in here:
http://www.phpfreaks.com/tutorials/8/0.php
that I think is the basic templating with php. there are advanced ones which will need more effort at the beginning but will help a lot in the future. :)
---
siggy space for rent

You may also want to include an @ sign before "incude" to suppress ugly error warnings which some times occur.
If you're interested in SMS, visit my wife's site .

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |