changed parameters

parameters take in $db and $_POST