Jump to content

Array Help?


nz4y45

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.