Hi, Guru,
I am new in PHP. I am playing PHP with MySQL and Apache. The problem I have is:
I use FORM to get query parameters entered from Web page. After users click on "submit", they will get the login page. I can get the parameters they entered on this page. But I don't know how to keep those parameters after they login the database.
I can also choose to let them login the database first, then prompt them to enter the parameters. But this way, after they submit, the connection to the database gets lost.
I know that this is simple question and there must be a solution to it. But I could not find it.
Help needed. Thank you in advace.
-MY
Pass variable values and database connection to next page
Moderator: General Moderators
-
minghua8930
- Forum Newbie
- Posts: 1
- Joined: Sun Jul 20, 2003 10:00 am
Sounds like you need to use sessions.
Sessions will allow you to retain variables across multiple pages.
Read this sticky note: http://www.devnetwork.net/forums/viewtopic.php?t=6521 for more information.
Sessions will allow you to retain variables across multiple pages.
Read this sticky note: http://www.devnetwork.net/forums/viewtopic.php?t=6521 for more information.
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
...
Yep use either cookies or sessions to store details of the user.
Check out the php site for more info on them.
http://www.php.net/manual/en/function.setcookie.php
http://www.php.net/manual/en/ref.session.php
Check out the php site for more info on them.
http://www.php.net/manual/en/function.setcookie.php
http://www.php.net/manual/en/ref.session.php