Should I be aware of any problems with this under Win2K? I had a HTML form calling a php script working sweet. Then I combined them using a call to $PHP_SELF; as the action and it just doesn't want to know.
This isn't a Win2k thing, it's a "new versions of PHP have more restrictive default autoglobal behavior" thing. I can see the need for a sticky on this topic, but for now, check out this thread: http://forums.bit-tech.net/showthread.php?s=&threadid=13937 $_SERVER['PHP_SELF'] is the new equivalent superglobal.
Ah, right. Tried that before but looks like my syntax was a little off. Now if I can just get rid of the message. :/
Either turn off error reporting for that page, or you (prolly) need to define Submit before doing things with it. If you dont mind, paste line 2 onto here and I'll take a gander
Yeah, it's pretty obvious I need to declare the variable, but of course $Submit is used on the next line for a comparison in an if statement. Which means when the script calls itself, the variable will be redefined, and the block of code that should execute, wont. Think I may tackle this by just implementing sessions now instead of in a few days. Unless someone has a better suggestion. btw, the reason it says 'undefined index' and not 'undefined variable' is because I'm using $_POST["Submit"] as opposed to $Submit. I've tried both, no joy.
heh If you find you still get errors a little like the one you had, even when you're using isset() - try using empty() insted, which is my preference since I had a lot of errors like yours when using full error reporting.