Add protect function

This will take strings like "'" and make escape them to look like:
"\\\'"
Protect input in index.php
Protect registerdoctor.php
Protect restore.php
Protect trash.php
Batch protections