Basic PHP form error: 405 Not allowed. Help Please!

I made a github repository with HTML and PHP:
Repo: https://github.com/Conner1115/form-handling
Link: https://conner1115.github.io/form-handling/

What I was trying to do was use a w3 example of PHP and see if it worked.
When I submitted the form, github would throw an error saying “405 not allowed”. Can you please explain why this happens and possibly what I had done wrong?

Possibly the folder permissions are set to not allow code execution on their server.

Do you have your own hosting where you can try it out?

Do you mean like having my own domain name?
I don’t have a custom domain name and I don’t own any.

I guess that does make sense if github doesn’t want anyone hacking their stuff.

Yes… when I’m in the control panel of my host, SiteGround, each folder has a set of permissions. I can set them individually whether I want people to be able to read, write, or execute. IIRC, 755 is the value that lets code such as your php execute.

If you get a chance to get your own hosting and site, there is a lot to be learned by playing around and googling things. Code playgrounds are good but there are a lot of little details that you have to pick up if you want your stuff to work “outside.” I think you can get hosting and a name for very cheap, practically free.

Good luck!

1 Like

Okay, thx. Will try.