Jump to content

update DB value


cronThis

Recommended Posts

I'm building a table that someone can come in and review and check off whether something is approved or not.  But I need the checkboxes to update the database.  The Problem is that I need

a way to say

 

      "IF the value in the DB of this 'checkbox column' is 0 then update to

a 1

              else DO THE OPPOSITE"

 

Here's my table thus far...

 

<td><a href="<?php echo $row_all_musicInfo['url']; ?>" target="_blank"><?php echo $row_all_musicInfo['url']; ?></a></td>

      <td><?php echo $row_all_musicInfo['cat']; ?></td>

      <td><input name="inProgress" type="checkbox" value="inProgress" disabled="true" <?php if($row_all_musicInfo['inprogress'] == 1){ echo "checked"; }?> /></td>

      <td><input name="approved" type="checkbox" value="approved" disabled="true" <?php if($row_all_musicInfo['approve'] == 1){ echo "checked"; }?> /></td>

      <td><input name="recorded" type="checkbox" value="recorded" disabled="true" <?php if($row_all_musicInfo['recorded'] == 1){ echo "checked"; }?> /></td>

    </tr>

 

 

Any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/89378-update-db-value/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.