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 Quote Link to comment 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"; Quote Link to comment Share on other sites More sharing options...
Rifts Posted October 15, 2010 Author Share Posted October 15, 2010 perfect thanks Quote Link to comment 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.