Results 1 to 2 of 2
Thread: Passing 'name' from forms. How?
May 3, 2005, 16:56 #1
- Join Date
- Aug 2004
- 0 Post(s)
- 0 Thread(s)
Problems with amount value from cookie to form
I have shopping cart where the basket is stored as a cookie. On my order page I use the following to get it assigned so that the next page can handle it.
document.secure.amount.value = (Math.round(altersecure(totalcost)));
On the card processing page there is the following statement.
<INPUT TYPE="hidden" NAME="amount" VALUE="$amount">
I take it at this point the value has been extracted from the cookie and passed to the processing page in the same way a form variable would.
So now I am trying to add this to a Mysql database using..
amount=request.form("amount") and doing an insert.
Problem is it just comes out 999.99
The mysql field is a decimal 4,2. If i put it to VARCHAR then the price comes out but withouth the decimal point.
Could anyone point out where I might be going wrong please.
Last edited by Northernladuk; May 3, 2005 at 18:06.