php - jQuery's serialize() function only returns the last selected checkbox value and not all of them! -
$('form').serialize(); <label>check applies:</label> laptop owner: <input type="checkbox" name="applicable" value="laptop owner" /> <br /> samsung tv lover: <input type="checkbox" name="applicable" value="samsumg tv lover" /> <br /> animae watcher: <input type="checkbox" name="applicable" value="animae watcher" />
if check "laptop owner" , "animae watcher" returns latter, why? need return both.
edit
i should when send forms values php returns last checked checkbox, php looks like:
<?php echo $_post['applicable'].' says php'; ?>
change name="applicable"
name="applicable[]"
<?php print_r( $_post['applicable'] ); ?>
Comments
Post a Comment