I am trying to wrap my head around a project that I would like to work on to attempt to get more familiar with programming in PHP.
I want to create a website that's easy to update without a full blown CMS. I was thinking of using the HTML5 contenteditable widget.
What I envision is the following:
- User logs in and a session is started that will allow php to echo the content editable tag so that it's only visible when a user is authenticated.
- Once logged in, the user can make changes to the file and click a save button and the file will be updated. THIS IS WHERE I NEED HELP
Is it possible to update the php file you are currently on? If it is, does it involve ajax or just pure php? How do I pass the content within the contenteditable
widget to be saved on the server? I don't want to use FTP so I'm assuming I have to learn how to do this with AJAX? I hate to ask but if you have example code that would be awesome!
Lastly, is this a super major security risk?
Thanks in advance!
Atlante