Like John said:

You can use:

In the second page:
$user = $_POST['username'];                // sent by the first page
...
echo "<form ...>
<input type='hidden' name='username' value='$user'>
...
</form>";

So, when you submit the form, in the third page you will be able to get the
username.
$user = $_POST['username'];

Yo can do this in N number of pages. If you always pass and obtain the
variable via POST or GET no matter how much pages yo use. In the 20th page
you'll get the variable.



"Rashini Jayasinghe" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]

Hi,

I want to pass a variable between three pages. I tried to get a username
from the first page through a form. Use that username in a select statement
in the second page to query a table.Everything is fine up to that point. now
I want to pass the same username to the third page where I have to use it to
select a table name by that username and it doesn't work. I tried
$_POST['username'] and the value is not passed to the third page. Is there a
way of doing this?
Please help.

Thank You.

Rashini

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to