0

Help with the code

Why does this code not display the result? https://code.sololearn.com/W2DSepJKrzDJ/?ref=app

30th Sep 2019, 7:48 PM
Михаил Попов
Михаил Попов - avatar
5 Answers
+ 1
No all of your php codes in html file, will commented out. The extension of the file tells the server that it should run php commands and will not deprive the result from its status as HTML. Therefore, if you don't use the php extension, the server will never know it should run the php code you have in it.
1st Oct 2019, 4:42 AM
Pixy Boy
Pixy Boy - avatar
0
You can't use php codes in file with html extension (test.html) You should run file with .php extension
30th Sep 2019, 9:03 PM
Pixy Boy
Pixy Boy - avatar
0
Or you can add action in form and Posting data to another php file an you can handle your formData in php file
30th Sep 2019, 9:07 PM
Pixy Boy
Pixy Boy - avatar
0
Why does it say that some variables are not defined? Doesn't php create them yourself if you mention them somewhere in the code?
1st Oct 2019, 4:27 AM
Михаил Попов
Михаил Попов - avatar
0
but how do I enable this extension?
1st Oct 2019, 4:46 AM
Михаил Попов
Михаил Попов - avatar