We should also probably move the $data array grabbing all the form data to here, right after checking the form key too, so we only grab it if the form is valid.