Forum Moderators: coopster

Message Too Old, No Replies

Seeking help with Form => Array

         

Phases

8:13 am on Jul 24, 2005 (gmt 0)

10+ Year Member



Hell there! I'm new here and new to php. I'm having a problem that's making me want to pull my hair out.

Basically, I have admin2.php that pulls in contact forms that have been submitted and displays them for me. They each have a 'save' and 'remove' radio button by them. When I choose what to do with them and hit submit, (sending to admin3.php) the $_POST on admin3 prints as:

Array ( [35] => 3 [34] => 2 [33] => 3 )

(the values "2" and "3" are the only options. "1" is they're current, 'unread' value. 2 will "save" them so I can call them out again on a different page, and 3 will mark them as read.)

I need help figuring out how to pull the array# (as $cid) and the value (as $read1) out of there, then do my query to update $cid's read1 column with $read1. But I can figure the query out myself so I just need help with the first bit.

I've been reading on arrays and foreach and several other things and I just dunno. Any help would be appreciated.

Thanks guys.
-Phases

Phases

1:01 pm on Jul 24, 2005 (gmt 0)

10+ Year Member



Nevermind, got it!

jatar_k

3:46 pm on Jul 24, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



well we sure weren't much help

glad you sorted it Phases

and Welcome to WebmasterWorld