More PHP Table Help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wknit
Forum Newbie
Posts: 6
Joined: Thu Sep 19, 2002 11:32 am

More PHP Table Help

Post by wknit »

Scenario: home page w/table, 3 columns. In the center column I am calling a script to post news like this:

Code: Select all

<td>
  <?php include 'index.php' ?>
</td>
The news posts are stored in MySQL, and I display three at a time in the column... well, almost...

Everything works fine except when I choose the next page of posts, it's a new page and is no longer contained within the context of the table/column that the original 'include' displayed. Is there a way to fix this?

Here is the code that calls the next page of posts:

Code: Select all

echo "[<a href="index.php?page=$next" title="Page $next">Next >></a>]";
I know that I can rewrite the index.php file to have all the attributes of my home page (menus, graphics, etc) and just use the index.php directly, but I'd like to solve this inside of a table if possible.

Anyone?
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

You probably want the href to point to the name of the homepage, not the actualy included file, but without seeing more code I can't say for sure.
Post Reply