|
Posted by david_ffm on 10/22/47 11:34
Hi Guys,
hope I'm on-topic here - couldn't find any leads with a search so
maybe someone has an idea.
I've got a PHP form that is supposed to set some variables from
its fields and then call itself by the POST method.
Here is e.g. a minimal test version called "top.php":-
#!/usr/bin/php
Content-type: text/html
<HTML>
Welcome <?php echo $_POST["name"]; ?>.<br />
You are <?php echo $_POST["age"]; ?> years old! <br>
Welcome <?php echo $name; ?>.<br />
You are <?php echo $age; ?> years old! <br>
<form action="top.php" method="POST">
Enter your name: <input type="text" name="name" />
Enter your age: <input type="text" name="age" />
<input type="submit" />
</form>
<? phpinfo(); ?>
</HTML>
When I enter data in the fields name or age, it just gets ignored,
goes missing, thrown away by PHP. The first 4 lines that should
output this info show that the variables are all blank.
The phpinfo() call at the end shows me clearly that register_globals
is on.
The only way I've found so far is with the GET method - there the
expected arrays and variables are also broken,
but $_SERVER["REQUEST_URI"] is correctly set (yipee!) and so
I can parse that myself - sort of defeats the point of PHP though.
What could be the problem here?
Is there some other setting I'm missing?
This stuff all worked without a hitch in PHP3 - has something
else been broken in the name of security?
TIA,
David
Navigation:
[Reply to this message]
|