Passing variables between php files

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Pintonite
Forum Newbie
Posts: 17
Joined: Mon May 20, 2002 5:11 pm
Contact:

Passing variables between php files

Post by Pintonite »

I need to pass information between php files. would the best way be through cookies?

Mark
User avatar
enygma
Site Admin
Posts: 175
Joined: Fri Apr 19, 2002 8:29 am
Location: Dallas, Tx

Post by enygma »

really it depends on what the script is for on which method to use...
Pintonite
Forum Newbie
Posts: 17
Joined: Mon May 20, 2002 5:11 pm
Contact:

Post by Pintonite »

OK, At the moment I have it so a user must login to see their "personal page." Passing the variable with a form is simple in this case, but I would rather not use forms for everything. From this personal page I want to be able to send along the users name and ID # which will be used for accessing files in other PHP files.


you can check what I am talking about here. Notice that once you are registered and logged in it says welcome $yourname in the title. That name plus a special hidden ID tag will need to get passed onto other pages
http://eisbock.dcc.uaf.edu/~fxmri/project/
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

sounds like sessions
Pintonite
Forum Newbie
Posts: 17
Joined: Mon May 20, 2002 5:11 pm
Contact:

Post by Pintonite »

Thanks for the help but I was able to figure it out. It was incredibly simple.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

jepp, it's PHP ;)
Post Reply