Jump to content

Processing multiple form submissions


smc

Recommended Posts

Hiya,

 

Okay I've run into a problem with my Moderation que on my CMS. Basically it echos articles out of my database that use the 'pending' status listing under my 'status' column in the DB. I have 3 radio buttons next to each name, "Approve," "Reject," and "Delete." How do I go about processing multiple entries at once, ie. Multiple radio button submissions.

 

I have set it up so the name of the radio button is the articles ID with _btn on the end of it. I can altar them for the specific radio buttons.

 

Thanks for any help you can offer!

Link to comment
https://forums.phpfreaks.com/topic/36869-processing-multiple-form-submissions/
Share on other sites

This might clear it up on what I'm using:

 

if ( !isset($_POST['submit']) ){
function echoresults() {
dbconnect();
$fido = mysql_query("SELECT * FROM stories WHERE status = 'pending' ORDER BY date ASC")
			or die( mysql_error() );
while ( $row = mysql_fetch_array($fido) ) {
	$author = $row['author'];
	$id = $row['id'];
$fidouser = mysql_query("SELECT * FROM users WHERE username = '$author'");
while ( $call = mysql_fetch_array($fidouser) ) {
	$firstname = $call['first_name'];
	$lastname = $call['last_name'];
}
$author = $firstname . " " . $lastname;
echo
	("
	<tr valign=\"top\" width=\"100%\">
        <td width=\"38%\"><a href=\"/staff/staff_viewstory.php?story=" . $id . "\" target=\"_blank\"><strong><font size=\"2\">" . $row['title'] . "</font></strong></a></td>
        <td width=\"26%\"><i><font size=\"2\">" . $author . "</font></i></td>
        <font size=\"1\"><td width=\"50%\">
        <input name=\"" . $row['id'] . "_approve" . "\" type=\"radio\" value=\"0\">
        <font size=\"2\">Approve</font>  
        <input name=\"" . $row['id'] . "_reject" . "\" type=\"radio\" value=\"1\">
        <font size=\"2\">Reject</font>  
        <input name=\"" . $row['id'] . "_delete" . "\" type=\"radio\" value=\"2\">
        <font size=\"2\">Delete</font></td></font>
        </tr>
	");
}
}

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.