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 (  => 3  => 2  => 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.
Thank you for the reply. This is bringing back the following:
Warning: Invalid argument supplied for foreach() in /home/virtual/site200/fst/var/www/html/admin3.php on line 15
I've been ponderin' on this.. will it be able to handle multiple .. rows.. and still be able to tell mysql and what not?
As you can see it's three different cid's with their values. The 33, 34, and 35 are the CID's, id for each contact form, then the 2's and 3's are what I've picked to do with them. Multiple rows from sql that I'm marking certain ways then sending them back. Can I do that? I'm so confused right now..
Well, I'm not sure what I've got that needs cleaning up and what doesnt... but it's working now. I used opera.mp3 suggestion and then dans for removing the single quotes, which worked.
Now, the whole system works fine. I even got the next page (saved contact forms) built and able to delete from there too by simply some copy/paste.
Really appreciate the help guys. This stuff can be tough! But never fails. Soon as one thing gets fixed another is ready to get worked on. Now with all these admin pages.. they each are using a simple php password to get into them.
Starting to get old! Going to be time to dig into sessions soon methinks.