Hi,
I am a newbie to php. I am testing out some code from a book. I created two files:
<html>
<head>
<title>Listing 1 - listing1.html</title>
<head>
<body>
<form action="post1.phtml" method="post">
UserNmae: <input type="text" name="Username"><br>
Password: <input type=password" name="Password"><br>
<input type="submit" ame="Submit" value="Submit">
</form>
<body>
</html>
// the username and password from the first file will be passed to this second file
<html>
<head>
<title>Listing 1: post1.phtml</title>
</head>
<body>
<?php
print( "The user name is: $Username<br>");
print( "The password is: $Password<br>");
?>
</body>
</html>
The form works...but when it tries to pass the parameters to post1.phtml, it gave this msg
Method Not Allowed
The requested method POST is not allowed for the URL /post1.phtml.
I tried a test with the following code
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
<?php
$int1 = 523;
print( "test<br>");
?>
</body>
</html>
and it did not print anything.
Can any guru here tell me the newbie what I did wrong?
Thanks