With what extension should i save this page containing both form and php .PHP or .HTML | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

With what extension should i save this page containing both form and php .PHP or .HTML

1st Jul 2016, 1:23 AM
Priyanshu Jaat
6 Answers
+ 4
you should save it as a .php file
1st Jul 2016, 5:30 AM
Midhun Mathew
+ 3
you can save your form in html but process it with a script that is written in a php file.
22nd Aug 2016, 8:45 PM
Bob Shah
Bob Shah - avatar
+ 1
if you have php code.you must need to save it as a .php file..otherwise php code will not execute .
11th Jul 2016, 1:33 PM
SOLEYMAN
SOLEYMAN - avatar
+ 1
Soleyman is not totally right. You can configure your webserver to also interpret other file with PHP. But normally, every file containing PHP, needs to be saved as .php and I would not save a combined file as .html.php - I would save those files in a folder like view to store all your files generating HTML output. Also separate CSS/js files in separate folders and divide application logic from view logic.
12th Aug 2016, 7:17 PM
Florianer
0
for easy recognition, you save the file as filename.html .php
14th Jul 2016, 9:37 AM
Sadeeq Suraj
Sadeeq Suraj - avatar
0
.php
11th Oct 2016, 3:38 AM
prashanth
prashanth - avatar