November 22, 2010
Satyam is close .. but if you want to protect one single file, you need to wrap the lines he/she provided with a
<Files "rep.php"> AuthType Basic AuthName "Restricted Files" AuthUserFile /etc/httpd/htpasswd Require valid-user </Files>
November 3rd, 2010
If he is using a radio button, then all possible values for each instance would have the same name - otherwise it will not function as a radio button, more like a checkbox.
One change I would make to the code is assuming the approved variable is stored in the table as well with approved = 1, pending = 0
<input type="radio" name="approve_<?php echo $row['totalid'];?>" value="1" <?php if ($row['approved'] == 1) echo " CHECKED ";?> >Approve <input type="radio" name="approve_<?php echo $row['totalid'];?>" value="0" <?php if ($row['approved'] == 0) echo " CHECKED ";?>>Pending
This will make sure each company has a approve_ID variable