Running PHP from HTML form

Forum for you who has PHP installation issues

Moderators: egami, macek, gesf

Post Reply
Oleg Butuzov
Last Samuray
Last Samuray
Posts: 824
Joined: Sun Jun 02, 2002 3:09 am

Sun Feb 02, 2003 11:20 pm

i did not understud what you gona do=)

if you want to run php files like html pages (C:\phpinfo.php for exemple) - it imposible apache run PHP for your script

if you want to include php scripts in the htmml pages you must use SSI.

User avatar
Posts: 826
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Mon Feb 03, 2003 12:00 am

Do you want to include php code in .html files?

Depending on the course you are reading make sure you are coding with the aspect that register_globals is off. This is default for PHP 4.2+

Basically this means the information that you post will look like $_POST['variable'] or $_GET['variable']

If you are just wanting to include PHP code in a file with .html extension all you have to do is edit your httpd.conf for apache
and add
AddType application/x-httpd-php .html

then restart apache and it will process all .html files as .php scripts.

Post Reply