I will start a session and it works for that first page it goes to and then when I go to the next page in the same domain the variables are no longer there? Any ideas on how to make these variables stay stored during the current session to be called at a later time as long as my site isn't left? <?php session_start(); //store session data $_session['sppkgtotal'] = $_POST["sppkgtotal"]; $_session['chasstotal'] = $_POST["chasstotal"]; $_session['plumbtotal'] = $_POST["plumbtotal"]; $_session['heattotal'] = $_POST["heattotal"]; $_session['floortotal'] = $_POST["floortotal"]; $_session['flcovtotal'] = $_POST["flcovtotal"]; $_session['wallstotal'] = $_POST["wallstotal"]; $_session['cabinetstotal'] = $_POST["cabinetstotal"]; $_session['electtotal'] = $_POST["electtotal"]; $_session['fireptotal'] = $_POST["fireptotal"]; $_session['rooftotal'] = $_POST["rooftotal"]; $_session['extertotal'] = $_POST["extertotal"]; $_session['drwintotal'] = $_POST["drwintotal"]; $_session['trimtotal'] = $_POST["trimtotal"]; $_session['appltotal'] = $_POST["appltotal"]; $_session['misctotal'] = $_POST["misctotal"]; ?> Code (markup):
And you're sure that you have session_start(); in the top of the other page? on the page where you define the sessions, have you tried to write print_r($_SESSION) in the bottom of the file to check if they're really defined?
make sur that session_start is the first thing in all your page, don't write any script before session_start
Hi, This is the right way <?php session_start(); //store session data $_SESSION['sppkgtotal'] = $_POST["sppkgtotal"]; $_SESSION['chasstotal'] = $_POST["chasstotal"]; $_SESSION['plumbtotal'] = $_POST["plumbtotal"]; $_SESSION['heattotal'] = $_POST["heattotal"]; $_SESSION['floortotal'] = $_POST["floortotal"]; $_SESSION['flcovtotal'] = $_POST["flcovtotal"]; $_SESSION['wallstotal'] = $_POST["wallstotal"]; $_SESSION['cabinetstotal'] = $_POST["cabinetstotal"]; $_SESSION['electtotal'] = $_POST["electtotal"]; $_SESSION['fireptotal'] = $_POST["fireptotal"]; $_SESSION['rooftotal'] = $_POST["rooftotal"]; $_SESSION['extertotal'] = $_POST["extertotal"]; $_SESSION['drwintotal'] = $_POST["drwintotal"]; $_SESSION['trimtotal'] = $_POST["trimtotal"]; $_SESSION['appltotal'] = $_POST["appltotal"]; $_SESSION['misctotal'] = $_POST["misctotal"]; ?> PHP: Thanks,
I believe that with all the information above I should be in great shape. I can't test it till I get back to work in the morning although i'm satisfied that it should be fine at that point. Thank you all for your responses this is a very helpfull forum