Free Forums with no limits on posts or members.
zIFBoards - Free Forum Hosting
Welcome to MPAM Rebooted Forums. We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you're already a member please log in to your account to access all of our features:

Name:   Password:


 Problem Opening A PHP File From a HTML File, Opening PHP file from HTML file
Posted: Oct 30 2008, 12:11 AM


Group: Members
Posts: 1
Member No.: 981
Joined: 28-October 08

To anyone that can help,

I am using Apache and PHP 5.

I am new to this environment and think I am missing some sort of command for apache.

Basically I made a small HTML test document and in it has two forms. One for a Name, the other for any type of text information I type in. This information is then submitted to a PHP script.

The problem is when I press send the php document is opened as a text document in notepad. I did not save it as a .txt file, I saved it as a .php. I can open the document via internet explore by going typing the directory name directly but for some reason when the document is called from the HTML document it is opened as text.

Has anyone experienced this before and has fixed it?

The code is as follows:
<title>A Simple HTML Form</title>
<form action="send_simpleform.php" method="POST">
<input type="text" name="user"/></p>
<textarea name="message" rows="5" cols="40"></textarea></p>
<p><input type="submit" value="send"/></p>

echo "<p>Welcome <b>".$_POST["user"]."</b>!</p>";
echo "<p>Your message is: <br/><b>".$_POST["message]."</b></p>";

Thanks for your help.

Posted: Oct 30 2008, 08:08 AM


Group: Admin
Posts: 182
Member No.: 18
Joined: 16-April 05


Are you sure you did properly the part called "Configuring Apache to work with PHP" in the tutorial? Particularly the part where adding "AddType application/x-httpd-php .php" in php.ini.
Otherwise, does the problem occurs on other browser than MSIE? (Firefox, Opera...)


PatheticCockroach - MPAM Rebooted - Wiki4Games, the free video game wiki
user posted image
« Next Oldest | Tutorials & help | Next Newest » - The best sales, coupons, and discounts for you

Topic Options

Hosted for free by zIFBoards* (Terms of Use: Updated 2/10/2010) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Page creation time: 0.0386 seconds · Archive