I'm rather new at PHP.
I'm trying to run a script, but every time I do so, I'm not quite getting the output I should be getting.
I'm using this my Dreamweaver at home & working on the simple examples from this website http://www.php.net/manual/en/tutorial.forms.php
I've typed in:
index.html file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form action="action.php" method="post">
<p>Your name: <input type="text" name="name" /></p>
<p>Your age: <input type="text" name="age" /></p>
<p><input type="submit" /></p>
</form>
</body>
</html>
action.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
Hi <?php echo $_POST['name']; ?>.
You are <?php echo $_POST['age']; ?> years old.
</body>
</html>
Every time I run "index.html", although I can see the "form" & after typing "name" and "age", as soon as I press the "Submit Query" button, I get a pop-up message (as if it's opening a file "action.php" & when I say "Open", I get another pop-up message saying:
"Invalid Menu handle"
RATHER THAN the output, which I think I should be getting:
a message SIMILAR to "Hi Joe. You are 22 years old." (as it can be seen from the example given on the PHP website).