Re: PHP Basic's Problem with a simple script.
| From: | Steve Douville | Date: | Tue, 01 Jun 2004 15:45:25 +0000 |
| Subject: | Re: PHP Basic's Problem with a simple script. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187355@lists.php.net to get a copy of this message | ||
This works perfectly fine for me, as is.
fyi -- It doesn't matter what case "post" or "get" are in the code, the
global _GET and _POST will be populated properly.
----- Original Message -----
From: "php-general" <php-general@rf-funkinternet.at>
To: <php-general@lists.php.net>
Sent: Tuesday, June 01, 2004 11:24 AM
Subject: [PHP] PHP Basic's Problem with a simple script.
Hi !
I am an unexperienced PHP newbie, and a have a Problem:
The following script is a sample from a PHP tutorial,
but it does not work on my machine.
I use PHP Ver. 4.1.2 with apache 1.3.26 on a debian box.
In php.ini, "safe_mode" is off, and "register_globals" is on.
The script from the mentioned tutorial
(http://www.galileocomputing.de/openbook/php4/kapd.htm)
should be a sample for a php-file which invokes itself;
This does not work on my machine;
I can enter names and submit them as often I like, but
the statement from the if-block is never executed, i.e.
the output "You have entered the following name: ..."
is never displayed.
Here is the excerpt from this script:
----------------------------------------------------------
<html>
<head>
<?php
if ($dispatched)
{
echo "You have entered the following";
echo " Name: $vn $nn<p>";
}
?>
</head>
<body>
Please enter a Name and send the form:
<form action = "ud12.php" method = "post">
<input name = "nn"> 2nd Name<p>
<input name = "vn"> 1st Name<p>
<input type = "submit" name = "dispatched">
<input type = "reset">
</form>
</body>
</html>
------------------------------------------------------------
I assume the reason is in global or general settings,
but I don't know them.
Does anybody know what to do ?
best regards
chrm