|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-02-11 10:10 UTC] jjeca at hotmail dot com
I read all your posts about the "Undefined variable" and I changed the php.ini global variable to On, but I still have that message when I want to referance a $submit variable!!! Message is : Notice: Undefined variable: submit in "..." on line 4 I tested it with php3 and php4 --->same thing PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 13:00:01 2025 UTC |
There are times when submit buttons don't pass values. I always forget the exact circumstances so rarely rely on them but anyway, assuming this is a post form, do: var_dump(array('p' => $_POST, 'r' => ini_get('register_globals'))); Of course, use $_GET for GET.I am having the same problem. I have a PC running Windows XP Pro and it has PHP 4.3.4. It is really annoying. Someone posted that they downgraded to 4.0.6 and it fixed the problem. Here is a test I ran on it and the results.... I created a file called "temp.php": --- <?php if (!$text) { $text = "Enter Text Here"; } ?> <form action="temp.php" method="post" enctype="multipart/form-data" name="form1"> <input name="text" type="text" id="text" value="<?php echo $text; ?>"> <input type="submit" name="Submit" value="Submit"> </form> --- Here is the error it returns...and yes register_globals is "On". It does nothing to help the issue.... --- Notice: Undefined variable: text in d:\---filepath---\temp.php on line 1