Hi.I have a form with these fields: <CFINPUT type="text" name="qty#x#" value="#session.myShoppingCart[x].quantity#" size="1> <input type="checkbox" name="emailReminder#x#" value="session.myShoppingCart[x].emailReminder" when I want to set the values,the qty is ok but I got an error on emailReminder which is : The value SESSION.MYSHOPPINGCART[X].EMAILREMINDER cannot be converted to a number. Here is the code for it: <CFLOOP list="#form.fieldNames#" index="x"> <CFIF findNoCase("qty", x)> <CFSET itemNumber = ReplaceNoCase(x,"qty", "") - deleteCount> <CFSET itemQuantity = Evaluate(x)> </CFIF> <CFSET session.myShoppingCart[itemNumber].quantity = itemQuantity> <CFIF findNoCase("emailReminder", x)> <CFSET session.myShoppingCart[x].emailReminder = ReplaceNoCase(x,"form.emailReminder", "")> </CFIF> </CFLOOP> what is my mistake?please help me I’m really stucked.thanks in advanced.
Your code: <input type="checkbox" name="emailReminder#x#" value="session.myShoppingCart[x].emailReminder" Should probably be: <input type="checkbox" name="emailReminder#x#" value="#session.myShoppingCart[x].emailReminder#" Your current code is literally trying to insert the value "session.myShoppingCart[x].emailReminder" (not a variable, the actual text itself) into a column in your database.