/ Published in: PHP
URL: http://www.php.net/manual/es/reserved.variables.post.php
Expand |
Embed | Plain Text
<?php { // Array of post values for each different form on your page. // Find all of the post identifiers within $_POST foreach ($postNameArr as $postName) { { $postIdentifierArr[] = $postName; } } // Only one form should be submitted at a time so we should have one // post identifier. The die statements here are pretty harsh you may consider // a warning rather than this. { // We have not died yet so we must have less than one. } switch ($postIdentifierArr[0]) { case 'F1_Submit': echo "Perform actual code for F1_Submit."; break; case 'Modify': echo "Perform actual code for F2_Submit."; break; case 'Delete': echo "Perform actual code for F3_Submit."; break; } } else // $_POST is empty. { echo "Perform code for page without POST data. "; } ?>
You need to login to post a comment.
