I am havein troubles gettin my form variables to work.
The "register_globals" in php.ini is set to its default of "off".

code:


<HTML>
<HEAD>
  <TITLE>Form Series - Example One</TITLE>
</HEAD>
<BODY>
<?
 global $PHP_SELF;
 echo $_POST["answered"];
?>
<form name="forma" action="<?php echo $PHP_SELF ?>" method="post">
asdasdasddassad<br>
 <input type="hidden" name="answered" value="fred">
 <input type="submit">
</form>
</body>
</html>


the  <?php echo $PHP_SELF ?> dosent print anything in the action of the form
and the
echo $_POST["answered"]; on the first run gives an error that says that
"answered" is
an undefined variable. but on the second submit this error is gone with the
submitted data
displaying correctly.

Im an experianced ASP developer and im getting frustrated with PHP. why is
it so dificult
to do the simplest things in php?

please help with simple forms in php that is configured by default to have
"register_globals" set to off.
thanks



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to