Page 2 of 2

Re: Multiple Checkboxes and multiple forms

Posted: Sat Jan 22, 2011 11:48 am
by spedula
This question should be in a new thread, next time just create a new question, you'll probably get more people answering you that way since they'll see no replies and will want to be "FIRST!!!" on it, lol

I'm assuming that you already have it setup to display all the rows from your table using:

Code: Select all

while($rowdata = mysql_fetch_array($query)) { //do stuff }
Your original query should look something like this then:

Code: Select all

$query = mysql_query("SELECT product, new, price FROM tbl_name")
This way, it will return the value of 'new' as well as all the other content.

Now, in the while loop you have to tell it to do something extra if $rowdata['new'] == yes. That something extra could be:

Code: Select all

echo "<img src='new.jpg' />";
or whatever you want it to do if the item is new.

Play around with it, make some mistakes, learn. :)

Re: Multiple Checkboxes and multiple forms

Posted: Sun Jan 23, 2011 7:41 pm
by weblearner
hi spedula

thanks for replying, am not very confident yet, let me try and figure out further...