MDanz Posted August 2, 2010 Share Posted August 2, 2010 i have this in a loop and a form <input type='checkbox' name='$topic' value='No' /> on the page the form directs to. How do i get each separate topic that has been checked? Quote Link to comment https://forums.phpfreaks.com/topic/209557-checkbox-form-help/ Share on other sites More sharing options...
PravinS Posted August 2, 2010 Share Posted August 2, 2010 Give array name to checkbox like name="topic[]" and assign some value to it. When form is posted you will get checked values in array format. Quote Link to comment https://forums.phpfreaks.com/topic/209557-checkbox-form-help/#findComment-1094017 Share on other sites More sharing options...
MDanz Posted August 2, 2010 Author Share Posted August 2, 2010 but how do i keep the $topic variable. do i do this? $topic[] Quote Link to comment https://forums.phpfreaks.com/topic/209557-checkbox-form-help/#findComment-1094018 Share on other sites More sharing options...
MDanz Posted August 2, 2010 Author Share Posted August 2, 2010 basically i'm asking how to pass variables in a loop through checkboxes. Quote Link to comment https://forums.phpfreaks.com/topic/209557-checkbox-form-help/#findComment-1094021 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.