I am trying to pass values from a check box to the next page, which is an insert page that is storing values for the check box field ( archive: yes if checked and no if unchecked, or 1 and 0).
Can I get some help here?
one.php:
Something on these lines, and then on page two.php I can get values by POST and then store that in the database.Code:<input type="checkbox" name="archive" value="<?=value from database ;if(value from database ==1){echo checked};" >
Problem is how to store uncheck value and also how to retrieve and pass value to the checkbox. A user should be able to check and uncheck if he/she wants to edit a record.
In my few failed attempts, I have been able to (to some extent) to store value as "1" for checked box, but am struggling to store value for unchecked and then retrieving the stored value for editting.
Any help would be appreciated,
Thanks



Reply With Quote
Bookmarks