Re: Passing variables between pages
| From: | Raditha Dissanayake | Date: | Tue, 14 Oct 2003 04:04:03 +0000 |
| Subject: | Re: Passing variables between pages | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-166043@lists.php.net to get a copy of this message | ||
Hi,
You need to use sessions. Please refer session handling functions in the manual. Having said that it's a bad idea to put username in a session. You need to have some kind of association between session ids and username's in app. The most common way this is done is with a two column table.
all the best
Rashini Jayasinghe wrote:
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-- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha/megaupload/ Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 150 KB | with progress bar.