Skip to main content
PHP HTML Editor

Guides for PHP sites

Letting people upload pictures and files is where a rich text editor on a PHP site gets serious. These guides explain what can go wrong, in plain English, and how to set it up so you can stop thinking about it.

How to add an image gallery to a PHP HTML editorBrowse, upload and insert pictures from your own server, with folders and limits, in a few lines of PHP. A PHP file manager with permissions for guests, members and adminsWhat each role sees and may do, and why hiding a button is not the same as refusing the request. Role-based upload permissions in PHP with one policy fileMove every rule about files out of your page code and into one file a person can read. Secure file upload in PHP: the checks that matter, in plain EnglishWhat can go wrong when a site accepts files, and the check that stops each problem. Give each user their own upload folder in PHPKeep one customer's pictures away from another's with a single line of code per folder. Remove EXIF and GPS data from uploaded photos in PHPA phone photo can reveal where it was taken. How to clean it on upload and keep it the right way up. Clean HTML from a rich text editor in PHP and stop XSSWhy the browser cannot be trusted with this, and how to clean the HTML before you save it. Add a WYSIWYG HTML editor to a PHP form and save it to MySQLFrom an empty page to a working form: the editor, the cleaned HTML and a safe database query. JavaScript rich text editor or PHP HTML editor: what your server has to doA browser editor edits text. Files, folders and permissions still need a server. Here is the list. Run a PHP HTML editor on Windows IISFolder permissions, web.config and the settings that catch people out, from a real IIS install.