You should use $POST["submit"] instead of $submit. "Register global" is, by default, set to off, so form variables aren't simple $ + their name... you can turn Register global on, but I think $POST["submit"] is better (for security reasons). By the way, if your request method is POST, use $POST["variable name"]
If it is GET, use $GET["variable name"]