How do I carry a Form Field Variable from one page to another in PHP MySQL?

Phil M

New member
How do I carry a variable to the next page so I can use it in an entire different query to automatically pull up information, but have it remember the acutal user name that was entered.
Example:
Table1 has these fields: UserID, username, password, name, address, etc..
Table 2 has username, clientname, clientaddress.

Now Imagine I login, at attorney_login.php, and this form refers to same page but redirected to Main Menu. Then at the main menu, I setup an automatic query to show the NewClients(Table2) so the attorney can view its clients without actually running a query manually. I know how to setup the query, but the only thing I can't figure out is how to get username TABLE1 variable to username TABLE2 variable.

In other words, take carry the actual user name 'Tim2009' to $username = $_GET['username'];
Instead of that statement, what statement can I use? A Cookie? or Session? Its not wanting to take ['username''] from prior form because prior form is a POST method and action is PHP to SELF.

How do I carry it over to match the username from TABLE 1 to TABLE 2
 
Back
Top