Posted by:
Phil3566
(---.hsd1.ca.comcast.net)
Yes I checked and double checked the syntax, and that's not it.
I installed wampserver on another machine and I have the same problems. I can tell that PHP and Apache work individually, but when I use the two scripts described above (form.html and action.php), the browser either asks me how to open the php file, or sends the entire text to the screen, depending on the browser (IE or Firefox).
When I run [
localhost], I get the following:
Hi
Notice: Undefined index: name in C:\wamp\www\action.php on line 1
. You are
Notice: Undefined index: age in C:\wamp\www\action.php on line 2
0 years old.
So it looks like PHP by itself is working. Now when I run C:\wamp\www\form.html and I click submit, IE returns:
Hi <?php echo htmlspecialchars($_POST['name']); ?>.
You are <?php echo (int)$_POST['age']; ?> years old.
On the first machine where I installed wampserver, the browser says "It works!" in big bold letters when I type [
localhost]. On the second machine the browser gives me a much more elaborate answer (logos, interactive menu where I can run phpinfo(), etc). Could this be a clue?
Thanks!