I've been working on a project for a game (so you'll understand that I can't post the actual script), and I'm cleaning up the code and placing code into functions instead of just after the
if ($_POST['name'] { //code }
Is this the correct method of doing what I'm trying? (I tried, but it broke my system)
if ($_POST['action'] == "actionName") actionName($_POST); //calls function if the $_POST is present
function actionName($_POST) { //code }
Thanks in advance for correct answers!