All pastes #731554 Raw Edit

Something

public text v1 · immutable
·published 2007-10-10 04:34 UTC
rendered paste body
?php

        $privs = array('A', 'E', 'D', 'S', 'P', 'T');
        $tables = array('evac_info', 'evac_info_prereg', 'evac_users', 'evac_news', 'Bus_Roster', 'Sex_Offenders');

        $output = implode(";", $tables) . ";";
        $output .= '<br />';

        foreach($tables as $table) {

                foreach($privs as $priv) {

                        if(array_key_exists($table . '_' . $priv, $_POST)) {

                                $output .= $priv;

                        }

                }

                $output .= ';';

        }

        echo $output;

?>