Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input type='checkbox' value='1C-Q1-5' name='answer1[]' class='radio'>
- $_POST['answer1'] //this is an array
- $answers = $_POST['answer1']
- // we pass the fetched data first
- // then we transform then into a string if you want to save them in your database
- $final_answers = implode("," , $answers);
- //the $final_answers variable is a STRING that now holds all the chosen checkboxes but are separated by a comma
- //for example, it will hold a value "1C-Q1-5, 1C-Q1-2, 1C-Q1-1", if the user has checked the 1st, 2nd and 5th checkboxes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement