I wrote something like this, but I am always hesitant to share it to general public, because there are some great security risks and vulnerabilties ,if not protected well enough against unauthorized entries.
@BadManSam, for user login form as veedeoo syas if this is not done correctly you can leave your complete system open for some very powerful attacks.
I would suggest a frame work that has been tried and tested and maintained. 2 that come to mind would be Zend_Framework found Here, or CodeIgnitor Here
Both are throughly tested for attacks, and will give you the functionality you are after
You seem to be referring to some sort of online php editor? If so, I'd avoid that for security's sake. Ask yourself whether you really need that functionality. i always keep a development copy of the site - either on a remote testing server (secured to the nth degree!) or more often, locally - sometimes both. I'd always suggest making changes to the dev site and testing, testing, testing. Then if all seems ok, upload changes (ftp) and then test again and again and again. Different environments can cause unexpected problems. My 2p.
PS - one command often seen with this type of functionality is eval() - whatever you do - DO NOT use this unless you REALLY know what you're doing. Personally, I wouldn't touch it with a barge pole. :)