Rifts Posted October 15, 2010 Share Posted October 15, 2010 I cant seem to grasp how to accomplish this... I have 10 check boxes in a form on submit I need to be able to see which boxes where checked and depending on which ones were checked display a static link for each. so if i select boxes 1, 5, 8 i will get back www.link.com/1.php www.link.com/5.php www.link.com/8.php thanks Link to comment https://forums.phpfreaks.com/topic/215907-question-with-checkboxes-and-sending-links/ Share on other sites More sharing options...
ZachMEdwards Posted October 15, 2010 Share Posted October 15, 2010 Have your checkboxes named to an array, like so: <input type=checkbox name=box[] value='1'> And your PHP code should look like: $box=$_POST['box']; while (list ($key,$val) = @each ($box)) echo "www.link.com/".$val.".php"; Link to comment https://forums.phpfreaks.com/topic/215907-question-with-checkboxes-and-sending-links/#findComment-1122365 Share on other sites More sharing options...
Rifts Posted October 15, 2010 Author Share Posted October 15, 2010 perfect thanks Link to comment https://forums.phpfreaks.com/topic/215907-question-with-checkboxes-and-sending-links/#findComment-1122383 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.