clonefish logo

handling quotes escape quote forms php validation processing generating

As you may already know, there's a common problem with forms, databases and PHP: all of them have their special way of handling quotes. After all, it's not some terrific problem that couldn't be solved: it is only something you have to take care of:

The clonefish was built to provide a transparent form handling method (so you can even migrate your current code to clonefish, no matter if your magic_quotes_gpc is on or off). That's why you can control whether you're passing or want to receive escaped or unescaped data:

If you'd like to keep your application portable and you're handling $_GET/$_POST/$_COOKIE data, the best practice is to use get_magic_quotes_gpc() as the second parameter. This way clonefish will do the very same as PHP would: returns escaped values depending on the second parameter of the methods. Most of the time you'll now what you have and what you'll need: feel free to use the parameters as they fit your needs. For detailed description, see the reference for the methods!