CMS for allowing users to delete or edit a post
Usually you can use switch statements to clean up abundant if statements, but only if those if statements are similar; Such as checking for different values of the same variable. Since that is not the case here, there isn't much you can change in this area. Sometimes you just need a few if statements. I would, however, suggest that you not use the global $_REQUEST as it is rather insecure. Even if you think you are the only one who is ever going to use it, what if someone got in, you just removed one more step of security from your site making it that much more easier for someone to destroy your hard work. Even you could make a mistake later by accidentally duplicating a POST variable as a GET variable, or vice-versa. Or someone with malicious intent does it on purpose, you could run into a lot of problems there. You should also sanitize those. Check out filter_input (>=PHP 5.2) to get started, or check other forums on the best way to sanitize your form variables.

Your delima with checking for multiple checkboxes should be rather easy. You've already got your form set up to make them into an array after post. Or almost right. You need to change name to what you have for your value. That should work, but if it doesn't try making the value the $id and just leaving the name chk[], should probably do that anyways as it won't leave empty or useless values. After that just check the count.

$checkboxes = $_POST['chk[]'];
if(count($checkboxes) &gt; 1) { etc... }


There is a minor change you should make to your if statements. Since you are checking $options for a "delete" value, you should also check it for an "edit" value, or move that if statement into the else block and give it an else for the edit block. Otherwise, as you can imagine, you'll end up editing and then deleting your posts and that would take up unneeded resources.

if( //more than one check box is checked but I still have to figure this...) {
    echo "&lt;p&gt;For now, please just select 1 post you would like to edit.&lt;/p&gt;";
} else {
    if($options == "delete") { /*delete your post*/ }
    else { /*edit your post*/ }
}


I don't see anything else really. So good luck!