Join the millions that use us for their forum communities. Create your own forum today.
InvisionFree - 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
jrod11151979
Posted: Oct 30 2008, 12:11 AM


n00b


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:
<html>
<head>
<title>A Simple HTML Form</title>
</head>
<body>
<form action="send_simpleform.php" method="POST">
<p><strong>Name:</strong><br/>
<input type="text" name="user"/></p>
<p><strong>Message:</strong><br/>
<textarea name="message" rows="5" cols="40"></textarea></p>
<p><input type="submit" value="send"/></p>
</form>
</body>
</html>

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

Thanks for your help.

Top
patheticcockroach
Posted: Oct 30 2008, 08:08 AM


Administrator


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



Hello,

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...)

Regards,


--------------------
PatheticCockroach - MPAM Rebooted - Wiki4Games, the free video game wiki
user posted image
Top
« Next Oldest | Tutorials & help | Next Newest »
InvisionFree - Free Forum Hosting
Free Forums with no limits on posts or members.
Learn More · Sign-up Now

Topic Options



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