passing dynamic text from one page to the next

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
m12345
Forum Newbie
Posts: 2
Joined: Fri May 02, 2008 10:03 pm

passing dynamic text from one page to the next

Post by m12345 »

I need to find out how to pass a dynamic value from one page to the next.
This is the situation - a table gets populated with values from a database by using a while loop.
Then the table is displayed and when the user clicks on a value in the table I want to pass that value to the
next page where the user gets redirected. I found out I can't pass it through the URL because the value is different for
every cell in the table. Also values get added and deleted from the table all the time as requested by the user.
So I tried using session variables to access the information directly from the database and pass it that way to the
next page, but if I do that in the while loop I don't know how to name the variables so that I know how to access them
later - i.e. I wouldn't know how to match the session variable with the cell the user clicked on.
How can I get the value in the table, which the user clicked on to transfer to the next page? Or how can I make a query
to the database to retrieve on the next page only records matching that value? I am using PHP with MySQL.
AXEmonster
Forum Commoner
Posts: 34
Joined: Fri Sep 05, 2003 11:27 am
Location: newcastle UK

Re: passing dynamic text from one page to the next

Post by AXEmonster »

is the table dynamic

the rows are created depending on whats in the database?
m12345
Forum Newbie
Posts: 2
Joined: Fri May 02, 2008 10:03 pm

Re: passing dynamic text from one page to the next

Post by m12345 »

yes, I actually find out how to do it . Thanks.
Post Reply