[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
[an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]![]() |
![]() |
![]() |
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
![]() |
![]() |
![]() |
Jeg har problemer med php-variablen PHP_SELF, den er tilsyneladende blank. Flg. script burde bare virke. For at teste værdien har jeg tilføjet disse linier: <?php print("PHP_SELF = $PHP_SELF<br>");?> <?php print("SERVER PHP_SELF = $_SERVER['PHP_SELF']<br>");?> før <form action="<?php echo $PHP_SELF?>" method="POST"> Men der printes kun: PHP_SELF = SERVER PHP_SELF = Og der sker intet efter indtastning af værdier i formen.
<html> <body>
<?php if ($submit) { // process form $NN = $_POST["name"]; $AGE = $_POST["age"]; print("Welcome $NN<br>"); print("You are $AGE years old!<br>"); } else { // display form ?> <?php print("PHP_SELF = $PHP_SELF<br>");?> <?php print("SERVER PHP_SELF = $_SERVER['PHP_SELF']<br>");?> <form action="<?php echo $PHP_SELF?>" method="POST"> Enter your name: <input type="text" name="name" /> Enter your age: <input type="text" name="age" /> <input type="submit" /> </form> <?php } // end if ?>
</body> </html>
-- Med venlig hilsen
Jørgen Heesche mailto:sslug@sslug
![]() |
![]() |
![]() |
||||||||||||
|
||||||||||||||
![]() | ||||||||||||||
|
||||||||||||||
![]() |
![]() |
![]() |