Re: Multiple Checkboxes and multiple forms
Posted: Sat Jan 22, 2011 11:48 am
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:
Your original query should look something like this then:
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:
or whatever you want it to do if the item is new.
Play around with it, make some mistakes, learn.
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 }Code: Select all
$query = mysql_query("SELECT product, new, price FROM tbl_name")
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' />";Play around with it, make some mistakes, learn.