Thanks for your answer Jimmy, this will work for some parts I need but I was not clearly enough telling what I need. So I will try to explain it.
Customers fills in an order form and in one of the fields the total amount is calculated depending on the number of products ordered. Before customer clicks on the “Order Now” button the total amount is shown in te order form with the next code:
<p>Total amount is: <input name="Totaal" type="text" id="Totaal" size="6"> euro.</p>
The amount variable is correctly saved with Cookie Toolkit.
After clicking the “Order Now” button a next page is shown and there customer only has to choose his preferred method of payment. No other information needs to be shown or edited. Depending of customers choice he will be forwarded to a payment provider. The payment provider needs to know the total amount and expects to receive a variable they call $amount.
There’s my problem, on page two (“choose payment method”) variable $amount must be filled with the cookie I’ve saved on the page with the order form.