nz4y45 Posted February 17, 2009 Share Posted February 17, 2009 I'm so lost, I started a new topic, because I'm affraid my last was confusing. I have created an array, i can echo them to the screen as values, but would like to store them to a table as seperate rows. Below is the code to print the array - the values come from checkboxes with the name checkbox[] <? if(isset($_POST['checkbox'])) { print '<pre>'; // print_r($_POST['checkbox']); // print '</pre>'; print 'Send daily reports for the following change records?: '; echo "<br>"; // You wanted to loop. foreach($_POST['checkbox'] as $value) { echo $value."<br>"; } } ?> Link to comment https://forums.phpfreaks.com/topic/145618-array-help/ Share on other sites More sharing options...
allworknoplay Posted February 17, 2009 Share Posted February 17, 2009 Well, not to change your table design, but do you really want to do it that way? you should have the columns created a head of time in another table. Then connect them to your main table with a key like, table_id. Then for each column, you just make it boolean, along with who the user is and what it is that they want... Am I way off? Link to comment https://forums.phpfreaks.com/topic/145618-array-help/#findComment-764482 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.