scotchmen Posted January 26, 2010 Share Posted January 26, 2010 Hello all, This is my first post on this site, so not sure how this all works. I like to create a little script in php but dont know what approach is should take. What i wanna do is take a areabox fill it with some text for options (each on new line) then save to a db. Then in php make an foreach that puts in al in a array then, next to each line i want to place a checkbox that is connected to that one line. so far so good, now my problem is when a line is deleted the value of that checkbox isnt so how do i solve this? Thanks in advance, Regards, Ben Link to comment https://forums.phpfreaks.com/topic/189907-areabox-php-question/ Share on other sites More sharing options...
redarrow Posted January 26, 2010 Share Posted January 26, 2010 post your code then? Link to comment https://forums.phpfreaks.com/topic/189907-areabox-php-question/#findComment-1002085 Share on other sites More sharing options...
teamatomic Posted January 26, 2010 Share Posted January 26, 2010 foreach($array as $key=>$value) unset($array[$key]) dont run it as given or you'll just blow the array away. build the form with the foreach then you can use the key in the checkbox value to unset the array element by key. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/189907-areabox-php-question/#findComment-1002086 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.