Well, the obvious thing is... don't store into the session is your POST has no values, just like you wouldn't try to send an email from a form if the form had no data submitted. If you want your session variable not to contain something blank, if $_POST isn't set, don't store new values.
The sessions are working fine, but you're not working with them properly.
Should I just do what you are saying, and check if the $_POST field is empty and then set the values into an array. That way I could avoid SESSIONS entirely?
Well, if you just store them into an array, and not a session, you won't be able to move them between pages...
I'm not really sure what you're trying to do anymore.
There are two pages (let's say page1 and page2).
The first page contains numerous photos. Each photo contains a checkbox. If that checkbox is checked, a div opens revealing multiple select menus for choosing a number of photo prints at each size. It would looks something like this when the div opened:
4"x6" [select a quanitity]
5"x7" [select a quanitity]
8"x10" [select a quanitity]
So the user checks of all the photos that they want, and then select a quantity of each size for those specific photos. The user then presses a submit button, which leads us to page2.
Page2 is used to process this info. All of the info from the photo form is then echoed for the user to review. So it might look something like this:
Review your order:
Photo 1 - (2) - 4"x6" prints, (4) - 5"x7" prints
Photo 2 - (3) - 4"x6" prints, (1) - 8"x10" print
All of that works fine. The photo selections are echoed perfectly.
Page2 also contains a simple form to take in name, email, etc. The form also contains a hidden input field to pass along the order. At this point, if the page is refreshed, or if the user attempts to send the form, but gets errors in form validation, all of the values disappear. That is because the variables were being set based on the POST values from the previous page. So, of course, if the page is refreshed for any reason, the POST values no longer exist. So I started using SESSIONS to set all of the values so that they would still show up, even on refresh. Everything is working fine now, although you told me I was using SESSIONS improperly. I'm not quite sure how I'm using them improperly, though.