[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]![]() |
![]() |
![]() |
|||||||||||||||||||||||||
|
|||||||||||||||||||||||||||
![]() |
![]() |
![]() |
Hverken if(isset($_POST['submit'])) eller if($_POST['submit']) har nogen effekt: min form bliver ikke processed.
Register globals er nu slået til. phpinfo viste off, men efter installation af:
"
Name: php-ini
Version: 4.3.0-1mdk
Summary: INI files for PHP
"
og reboot er register globals slået til.
Scriptet ser nu sådan ud:
<html> <body>
<?php /* if (isset($_POST['submit'])) */ if ($_POST['submit']) { // process form $NN = $_POST["name"]; $AGE = $_POST["age"]; print("Welcome $NN<br>"); print("You are $AGE years old!<br>"); } else { // display form ?> <form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST"> Enter your name: <input type="text" name="name" /> Enter your age: <input type="text" name="age" /> <input type="submit" />
</form>
View source i Firefox: <html> <body>
<form action="/~jph/test/test-self.php" method="POST"> Enter your name: <input type="text" name="name" /> Enter your age: <input type="text" name="age" /> <input type="submit" /> </form>
</body> </html>
Som det ses har 'PHP_SELF' korrekt værdi.
![]() |
![]() |
![]() |
||||||||||||
|
||||||||||||||
![]() | ||||||||||||||
|
||||||||||||||
![]() |
![]() |
![]() |