示例#1
0
function sa_process_form()
{
    //Check if this is a form submission
    if (!isset($_POST["type"])) {
        return;
    }
    switch ($_POST["type"]) {
        case "rep":
            sa_process_rep();
            break;
        case "bill":
            sa_process_bill();
            break;
        case "vote":
            sa_process_vote();
            break;
        case "cat":
            sa_process_cat();
            break;
        case "val":
            sa_process_val();
            break;
        default:
            //This should never happen
            echo "ERROR: Illegal submission type";
    }
}
示例#2
0
function sa_process_form()
{
    switch ($_POST["type"]) {
        case "rep":
            sa_process_rep();
            break;
        case "bill":
            sa_process_bill();
            break;
        case "vote":
            sa_process_vote();
            break;
        case "cat":
            sa_process_cat();
            break;
        case "val":
            sa_process_val();
            break;
        default:
            //This should never happen
            echo "ERROR: Illegal submission type";
            $_POST["type"] = "rep";
    }
    return $_POST["type"];
}