But how do you reference the checkbox if it uses an array? If a checkbox is contained within a loop, it is unknown how many checkboxes will be displayed. Therefore, the variable name itself would have to be an array, right? If I already know the amount of checkboxes, I can give them each a name, and that's simple.
But in this case,the difficulty is when the checkbox is inside a loop. I can't figure out the code for this... <input type='checkbox' id='checkbox' value-'$file' name='cboPictures[]'> Grant On Thu, Apr 1, 2010 at 2:14 PM, Michael <m...@mikrosight.com> wrote: > > > IIRC, in the $_POST data, checkboxes are either present if checked and > not present if not checked. > > > Grant wrote: > > After spending so much time with the HTML code, I'm surprised at how easy > it > > is becoming to manually code HTML. I mainly use frontpage for quick > > references..I'll change to a color and see what the hexadecimal value is. > Or > > I'll design a table and copy the code that it created. I also use > > dreamweaver now...I sometimes use notepad but debugging is time-consuming > > when an error is on line 500...ha > > > > Can anyone help me figure out how to retrieve a checkbox array and then > > retrieve those values? > > > > I have a loop that displays every picture in a certain directory that > start > > with a certain MLS number such as 1234567_10.15.jpg, 1234567_13_19.jpg, > and > > so on. If it pulls 5 pictures, I would like a checkbox by each. I would > like > > to simply click the checkbox to indicate that I want to assign the > picture > > to the listing. Then I would like to add this value into a textbox called > > picture1, picture2, picture3, etc. > > > > while ($file = readdir($openedDirectory)) > > > > <input type='checkbox' id='checkbox' value-'$file' name='cboPictures[]'> > > I can get it to display a checkbox, but I don't know how to store and > > retrieve the values. I understand the concept of arrays, but don't > > understand them in PHP. How to access the values once I figure out how to > > store them? I've spent a lot of time trying to figure this out. > > > > Grant > > > > > > [Non-text portions of this message have been removed] > > > -- Grant S. Pollet, REALTOR Austin TX [Non-text portions of this message have been removed] ------------------------------------ The php_mysql group is dedicated to learn more about the PHP/MySQL web database possibilities through group learning. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php_mysql/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/php_mysql/join (Yahoo! ID required) <*> To change settings via email: php_mysql-dig...@yahoogroups.com php_mysql-fullfeatu...@yahoogroups.com <*> To unsubscribe from this group, send an email to: php_mysql-unsubscr...@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/