Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running query on a second page based upon first pages data

Status
Not open for further replies.

JiggyPoo

Technical User
Dec 31, 2002
66
US
Hey there,

I'm new to PHP. I'm coming from a VBA/MSaccess background.

what I need help with is:

I have a login page. My user types in his login name and password. This pushes the user to the user's information page. This information page should show customer sepcific data (according to what is in his account info - example: username, account type, etc).

How can I get php to "query" the database for this user's info once the login is completed. It needs to be done automatically.

Any ideas?
 
I can think of two ways.

In either case, I would use an HTTP "Location:..." header to direct the user's browser to the user page.

You could either use session variables or use a URL like " in the "Location: " header.

In the first case, the userpage.php script would recall the user's settings based on the session variable. The other by using information passed in a GET-method post. Want the best answers? Ask the best questions: TANSTAAFL!
 
yes,
and once u get the userid in the second page u can query database like
"select * from tablename where userid = $userid" ;

spookie --------------------------------------------------------------------------
I never set a goal because u never know whats going to happen tommorow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top