The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Multiple Record Update with Checkbox control

Hi everyone, this is my first post here. Sorry if there is a lot here, better safe than uninformed.
I use the current versions of php, and Mysql make my pages dynamic. I use Dreamweaver MX 6.1 to build my pages

I have been looking for a number of days on updating my database with multiple checkboxes through an array. The user selects a row with the checkbox to designate which record is updated. No matter what I do, either my loop does not work correctly, or I get no result at all with these notice errors.

"Notice: Undefined index: txtstudent0 in E:\www\intranet\new\admin_today.php on line 11

Notice: Undefined index: chkstudentdel0 in E:\www\intranet\new\admin_today.php on line 11"

I am using radio boxes to "choose" a php script to execute. Currently, I have a delete script that works fine, and an update that does not.
Here's my form code:

You're right

The radio buttons work as intentded - I changed the value to blank, since php doesn't have a problem with the declaration of variables like in asp. (Originally I was thinking Boolean, like a 1,0 then I changed my mind - I found the value had nothing to do with whether or not the script ran. I'm just checking to see if the radio button is in the post)

I actually have some new code to post, my current working code is using an array - I'm almost there figuring ou thow to make this work.

I can get the checkbox to update the proper columns in the record, but now I get 'array' instead of the value I want.

I found another post that helps out - will update here shortly. Something to do with implode...

Thanks a lot Big-A - you're right, phpinfo helps out a lot. Also, I'm posting to a different page to echo the values in my array. LMK if yo think of something else.

For example: If you check a checkbox in row 2 the database updates the record with the primary key "85" - but the array updates the last key [2] in this case "changing to something new 5" in stead of the intended key [1] "fenbjfdsfdjgsdfg" (hope that makes sense)