I was replying to a thread that talks about getting burned.
It seems as though you are pulling the price from your database which should be secure.
I don't think it can be changed by the user.
For your first question you may want to create a session
session_start();
Then create global variables which can be updated each page.
To see what I'm talking about visit
http://www.caillouette.com/CHAPTER25
only the first categories has books to purchase.
Do a sample purchase and watch the total price in the top right corner.
If this is what you are trying to do ask a specific question and I will try to answer it.
You need total price to be a global variable for starters