thefollower Posted October 19, 2008 Share Posted October 19, 2008 How do you get the array from a forum with checkboxs which create an array of values? My form has: <input type="checkbox" name="invite[]" value="<?=$value?>"> In there... then i need to get the array to process... do i just do: <?php If(isset($_POST['Submit'])){ $invite = $_POST['invite[]']; foreach ($invite as $email){ Echo $email; Echo '<br>'; } } ?> Because it won't work for me Link to comment https://forums.phpfreaks.com/topic/129154-solved-get-post-array/ Share on other sites More sharing options...
PFMaBiSmAd Posted October 20, 2008 Share Posted October 20, 2008 $_POST['invite'] will be the array. Just use - foreach($_POST['invite'] as $email){ Link to comment https://forums.phpfreaks.com/topic/129154-solved-get-post-array/#findComment-669628 Share on other sites More sharing options...
thefollower Posted October 20, 2008 Author Share Posted October 20, 2008 thankyou Link to comment https://forums.phpfreaks.com/topic/129154-solved-get-post-array/#findComment-669636 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.