this is weird. i have a form and i am inserting the form data into a mySQL dB. my first line i check to see if the Submit button has been pressed so:
if ($submit) {
right? i checked the Submit button in the form and the name is the same as the variable name. i'm stumped. 😕
maybe $POST['submit'] or $GET['submit'], depending on your register_globals and form method....
in otherwords, see [man]register_globals[/man] in the manual 🙂
Dammit, that beaver's following me again!
It's always a good practice to keep register_globals off in your php.ini file (which is probably what the case is here). Instead, use $GET["submit"] or $POST["submit"] as mentioned above. It helps a lot when debugging, or when other people are looking at your code. Check out http://us4.php.net/variables.predefined for more information on those and other predefined variables.
thanks for the info guys 🙂 i read through the manual some more and ended up using this:
if (isset($_POST['action']) && $_POST['action'] == 'submitted') {
and a hidden input object with name="action" and value="submitted".