Read post variables if (isset($_POST[‘submit’]) ) { foreach($_POST as $key=>$value) { $$key = $value; }