siki2000 Posted March 2, 2005 Share Posted March 2, 2005 i am trying to pass the user name from one form to another form. i have got a home page of a user and when he wants to book a meeting, he goes to the booking page. but when he makes the booking , i cant store it in the booking table because i dont have the user name for it. Quote Link to comment https://forums.phpfreaks.com/topic/2184-desperate-help-needed-with-php-code/ Share on other sites More sharing options...
samuraisam Posted March 8, 2005 Share Posted March 8, 2005 i am trying to pass the user name from one form to another form. i have got a home page of a user and when he wants to book a meeting, he goes to the booking page. but when he makes the booking , i cant store it in the booking table because i dont have the user name for it. 209968[/snapback] Have you tried a book on PHP? Here, Take a look at this. -Sam Quote Link to comment https://forums.phpfreaks.com/topic/2184-desperate-help-needed-with-php-code/#findComment-7206 Share on other sites More sharing options...
PMJ7671 Posted March 8, 2005 Share Posted March 8, 2005 i am trying to pass the user name from one form to another form. i have got a home page of a user and when he wants to book a meeting, he goes to the booking page. but when he makes the booking , i cant store it in the booking table because i dont have the user name for it. 209968[/snapback] Dreamweaver documentation and help offer detailed advice on how to develop multi-page applications as well as how to create and pass a session variable. Basically, you register the user name as a session variable when they login. Once a session variable is registered it is accessible from any page until the session ends. Use Dreamweaver help and search on session variable for relevant documentation. Quote Link to comment https://forums.phpfreaks.com/topic/2184-desperate-help-needed-with-php-code/#findComment-7210 Share on other sites More sharing options...
obsidian Posted March 8, 2005 Share Posted March 8, 2005 i am trying to pass the user name from one form to another form. i have got a home page of a user and when he wants to book a meeting, he goes to the booking page. but when he makes the booking , i cant store it in the booking table because i dont have the user name for it. 209968[/snapback] like PMJ said, you'll probably just need to hand code a session variable at the time of login... simply place the session_start() function at the top of your code, and then once they have successfully logged in, just assign their username to a variable like this: $_SESSION['user'] = $username; then, you can access the $_SESSION['user'] variable on any page of that domain during the current session. Quote Link to comment https://forums.phpfreaks.com/topic/2184-desperate-help-needed-with-php-code/#findComment-7211 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.