Re: Can I call .html file as a form action instead of .php?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Shiflett wrote:
MI SOOK LEE wrote:

Some guy told me that I can call the .html file as a form action
instead of .php file.


You can, but unless you configure your web server to consider .html files to be PHP scripts, it doesn't make much sense. HTML documents are static, so you wouldn't be able to do anything with the data.

Two things to add:

1/ Setting your webserver to consider all .html files to be PHP scripts is good and bad. It is sometimes considered good because it hides the fact that you're using PHP from potential attackers (but they'd have to know about a vulnerability in PHP first, so as long as you keep up-to-date...), but it's sometimes bad because it causes PHP to process all HTML files, even if they don't have any PHP in them, which slows things down.

2/ Passing parameters in the query string to a static HTML page can very occasionally be useful if you intend to do something with those parameters in JavaScript.

--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux