Jump to content

Areabox php question


scotchmen

Recommended Posts

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

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

 

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.