In diving into PHP, I am unable to pass variables to a php page nor retrieve environmental variables. Simple info() and echo commands, however, work.
form.html:
<html>
<head>
<title>UNTITLED</title>
</head>
<body>
<form action="action.php" method="POST">
Your name:<input type="text" name="name"><br><br>
Your age:<input type="text" name="age"><br><br>
<input type="submit" value="enter">
<input type="RESET" value="clear form">
</form>
</body>
</html>
action.php:
<?
if($_POST):
?>
<html>
<head>
</head>
<body>
Welcome <?php echo $POST("username"); ?> to alicynpackard.com, my personal portfolio site. You are <?php echo $POST["age"]; ?> years old.
</body>
</html>
<?php
else:
echo "No post variables found!";
endif;
?>
...and server.php (unrelated):
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo $_SERVER["HTTP_USER_AGENT"]; ?>
</body>
</html>
I've checked threads relating to passing variables, but code modifications per those responses didn't seem to solve the problem. Ohh, register_globals is on.
Whats the deal?
-Noah Pedrini