+ 3

Php learning

A having difficulty learning php because both on sololearn and w3schools, php is included in html, but my browser (chrome) says "405 not allowed",and I also google searched it and it was the same result, does anyone know the correct syntax?

15th Mar 2022, 11:49 AM
Richies
Richies - avatar
10 Réponses
+ 1
There are 9 HTTP methods that are used by browsers to communicate with servers. Of these, two are used more often than the others. This is the GET method for requesting information from the resource and the POST method for transmitting some information to the resource. The two methods cover almost all existing scenarios of client-server interaction from requesting an article to sending a login and password to the site. Since they perform different tasks, there is no need for the server to accept GET for authorization on the site or POST for uploading data. If the client does this and sends an incorrect request (not with the method that should be), the server will respond with an error. The same will happen if the resource is configured so that it cannot accept a specific set of requests that do not fall into the "standard". Such things.
15th Mar 2022, 12:15 PM
ITApple
ITApple - avatar
+ 3
So are you saying I used the wrong method?
15th Mar 2022, 12:27 PM
Richies
Richies - avatar
+ 2
What about the aspect of joining php and html together
15th Mar 2022, 12:53 PM
Richies
Richies - avatar
+ 2
Prince Raj should I combine my php script with my html code?
16th Mar 2022, 9:43 AM
Richies
Richies - avatar
+ 1
Error 405 can be fixed by pressing F5 or restarting the site (client side)
15th Mar 2022, 12:39 PM
ITApple
ITApple - avatar
+ 1
Explain your questions in brief what actually problem you are facing include some screenshots or attach the code you have written!
16th Mar 2022, 4:47 AM
Prince Raj
Prince Raj - avatar
+ 1
Peculiar_codes Create a .PHP file and in include the html in it.
16th Mar 2022, 1:21 PM
Chigozie Anyaeji 🇳🇬
Chigozie Anyaeji 🇳🇬 - avatar
+ 1
Peculiar_codes Yes absolutely, you can!
16th Mar 2022, 1:32 PM
Prince Raj
Prince Raj - avatar
+ 1
Peculiar_codes like this you can! Let's see if you get your answer... https://code.sololearn.com/wci7i6fdi6oz/?ref=app
16th Mar 2022, 2:29 PM
Prince Raj
Prince Raj - avatar
0
HTML is included in PHP Ex echo'<!doctype html...' And PHP can't run on a phone. Well but you can try using termux.
15th Mar 2022, 1:52 PM
Chigozie Anyaeji 🇳🇬
Chigozie Anyaeji 🇳🇬 - avatar