Hello all,
OK, I have a multi-part multi-page form. The status of the form (i.e. incomplete, skipped, complete) is handled in an array: parts 1,2,3,4.
I keep track of what parts are completed in the database as a courtesy to return users. I keep track in a MySQL set() column. Each set element has a decimal value: 1,2,4,8,.. respectively.
If the user is on, say, part 3, completes it, and the set() column is updated ("update table set col = col | 4 where id = ..") I need some nifty math to automatically convert 3 to its decimal equivelent of 4 (and of course any other part number, 4 to 8, 5 to 16, etc). Maybe this is not possible...
(BTW The tip for updating a set() column was found here -- go to the user notes below. Credit to: Monte Ohrt. Also, for this to work the initial create table must have the set() column as NOT NULL.)