Can't get an integer field to accept data
Does anyone have any idea why I can't get an integer field to accept numbers? I can go into the person's record in the db and type the numbers and they stay but if I try to insert a record into the db using a form, the field stays at 0. I've read tutorials until I'm almost blind but can't get it to work.
In the insert.php file I set a variable: $judgeCKCnumber = (int)$_POST['judgeCKCnumber'];
Then I INSERT into ckcNumber VALUE $judgeCKCnumber
Should that not work? I've tried also putting the (int) in front of the value, I've tried putting intval() around the value, both where I set the variable and in the VALUE part but NO WAY will it insert numbers into the db. I can't remember now but I think I even put the int and/or intval() on the variable when I set it. It's driving me crazy. The only solution I can think of is to change the field from INT to VARCHAR but then I'd have to go in and manually re-insert the #s into 298 records (I'm converting an html file with 298 people into a php/mysql file).