Can someone recommend a better method for doing something like the following? All of my programs are written like this, but it's really poor form considering I'm not predeclaring my variables, etc. Only thing I can really think of is to assign a value in the form a number like 1 or something, then do a if $value == 1 {do something} but that seems kinda hokey. Here's an example of something I'd do:
<HTML><BODY> <? if ($submitdata) { dosomething; exit; } echo "<form name=\"form\" action=\"$PHP_SELF?\">\n"; echo " <input type=\"text\" name=\"data\">\n"; echo " <input type=\"submit\" name=\"submitdata\" value=\" Submit \">\n"; echo "</form>\n</body>\n</html>"; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php