Passing variables through multiple files?

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
jonat8
Forum Newbie
Posts: 15
Joined: Sat Oct 12, 2002 1:02 pm

Passing variables through multiple files?

Post by jonat8 »

Hi,

Is this possible?

I have a PHP page, called index.php that consists soley of includes to other php pages, each which query a database.

In one of these other php pages (call it data.php) there is quite a lot of data so I want the user to be able to sort the database, so I put some sort links above the data that refreshes the page and resorts the data, i.e. data.php?sortby=fieldname

But clicking on that link only displays the "data.php" section of my page, and not the data from the other includes that are in index.php

So is it possible to pass the variable through index.php, as in if my sort links referenced to index.php?sortby=fieldname, it would sort the data.php dataset and display all the includes in index.php too

Hope you understood that!
Any ideas appreciated

Thanks :)
Post Reply