I'm trying to work about a way of validating submissions for my upcoming site.
Basically, when a registered member logs in they can submit a featured deal (web hosting). When I login to the admin cp I want to be able to approve the submissions in bunches of 5 or 10. I want it to work very similarly to the way posts awaiting moderation works on vB. I tried viewing the code of vb's moderate.php file but it's way too complicated for me at the mo. I'm still learning. Would a foreach loop do the trick? Here's what spits out the radio buttons at the moment:
PHP Code:while($row = $result->fetch()) {
echo '<li><strong>' .$row['title']. '</strong></li>';
echo '<p>' .nl2br($row['details']). '</p>';
echo '<p>' .$row['url']. '</p>';
echo '<p><label for="app_'.$row['dealid'].'"><input type="radio" name="eventaction['.$row['dealid'].']" value="1" id="app_'.$row['dealid'].'">Approve</label>';
echo '<label for="del_'.$row['dealid'].'"><input type="radio" name="eventaction['.$row['dealid'].']" value="-1" id="del_'.$row['dealid'].'">Delete</label>';
echo '<label for="ign_'.$row['dealid'].'"><input type="radio" name="eventaction['.$row['dealid'].']" value="0" id="ign_'.$row['dealid'].'" checked="checked">Ignore</label></p>';
}





Bookmarks