Jump to content


Photo

desperate help needed with php code


  • Please log in to reply
3 replies to this topic

#1 siki2000

siki2000
  • Members
  • Pip
  • Newbie
  • 2 posts

Posted 02 March 2005 - 11:57 PM

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.

#2 samuraisam

samuraisam
  • Members
  • Pip
  • Newbie
  • 3 posts
  • LocationMontucky

Posted 08 March 2005 - 05:03 AM

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.

View Post


Have you tried a book on PHP? Here, Take a look at this.

-Sam
Quality forums for your viewing and posting pleasure! Incomprehensible topics discussed among a close nit community of friends! SamuraiBlog.com! Where internet meets ronin!
SamuraiBlog.com :: SamuraiBlog.com Forums

#3 PMJ7671

PMJ7671
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 08 March 2005 - 03:15 PM

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.

View Post



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.

#4 obsidian

obsidian
  • Staff Alumni
  • Advanced Member
  • 3,202 posts
  • LocationSeattle, WA

Posted 08 March 2005 - 03:22 PM

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.

View Post


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.
You can't win, you can't lose, you can't break even... you can't even get out of the game.

<?php
while (count($life->getQuestions()) > 0)
{   $life->study(); } ?>
  LINKS: PHP: Manual MySQL: Manual PostgreSQL: Manual (X)HTML: Validate It! CSS: A List Apart | IE bug fixes | Zen Garden | Validate It! JavaScript: Reference Cards RegEx: Everything RegEx




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users