I am a newbie to PHP, so I apologize ahead of time if this question seems to be quite elementary.

I have two PHP files, we'll call them file A and file B. The first file, file A grabs all it's values from an html file that uses <form method=post> with name and value, etc.. then I use $_POST to declare each one to a variable. now, I want to use a few of the variables that have already been declared in file A in file B. How exactly do I do that?

You can also use cookies, but pointing sessions are still the better way to go. If you want a quick rundown on sessions, check out http://jream.com/learning/videos/php-ba ... e-security It's a 6 minute video that runs you through the essentials with a couple of follow along at your own discretion examples.

How do I assign a variable to a session? I have attempted it two ways: $_SESSION['bagelT'] = $bagelT;$_SESSION['selectBread'] = '$selectBread';. but neither of them return what is defined to the variable.For the case of bagelT it is as follows:

I presume you want to get the value selected from the dropdown menu, not just echo out the dropdown menu in future, in which case you don't assign the whole menu to a variable you just have the menu on your form and then get the valu posted from it.

simplypixie wrote:I presume you want to get the value selected from the dropdown menu, not just echo out the dropdown menu in future, in which case you don't assign the whole menu to a variable you just have the menu on your form and then get the valu posted from it.