I have a question, I made a form using check boxes with a value of ON and submitted them to a DB. Now what I am trying to do, Is only list the rows that have a value of ON. Anyone know where to start on this?
Thank You.
SELECT * FROM table WHERE checkbox_field = 'ON'
Originally posted by devinemke SELECT * FROM table WHERE checkbox_field = 'ON' [/B]
Originally posted by devinemke
[/B]
Thanks, But lets say I want to display the data in a table...is there a way for php to draw the table and list only the rows with the checkbox value of ON?
run the above query. loop thru the result set and [man]echo[/man] out the appropriate HTML to form the table. you did not mention which RDBMS you are using but if it's mySQL then have a look at: [man]mysql_query[/man] [man]mysql_fetch_assoc[/man]
I dont think i am explaining this well...here is a picture that may help demonstrate what it is I am trying to do...Maybe I am going about it all wrong.
Thanks for your help.