Page 1 of 1

Beginner question

Posted: Thu Mar 30, 2006 12:55 pm
by ammd
I'm trying to learn PHP under IIS. I wrote this simple HTML file with a form that calls a PHP program:

Code: Select all

<html>
<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>
This is the file action.php:

Code: Select all

<html>
<body>
Hi 
<?php echo $_POST['name']; ?>.
You are <?php echo $_POST['age']; ?> years old.

</body>
</html>
The initial HTML file and action.php are located in the same directory: C:\Inetpub\wwwroot.

I open the HTML with Firefox, fill in some data, click the Submit Query button and the program action.php is called, showing the result. But when I try to do the same with IE, nothing happens when I click the Submit Query button. Not even an error message.

Any idea about what is going on? Thanks.

Posted: Thu Mar 30, 2006 1:22 pm
by feyd
your body tag is malformed.

Posted: Thu Mar 30, 2006 2:40 pm
by ammd
Stupid me!!! How didn't I see that!!! The problem is that neither Firefox nor IE showed any errors. Thanks!!!

Posted: Thu Mar 30, 2006 3:14 pm
by pickle
Trying to validate the page would have shown it ;)