I actually recognize the function. It's used by Larry Ullman in the book I used as my introductory
PHP text (
PHP and MYSQL for Dynamic Websites) and AFAIK he wrote it.
There is an entire chapter in the book in which you construct an e-commerce site, and I'm betting a dollar your script originated there. It's an excellent book, btw.
There's no need to wonder about magic quotes or anything else, and unless you are using a server on which you installed
PHP yourself, the "default" settings are meaningless. Webhosts can and do establish defaults different from the
PHP version.
The easy solution: Save this tiny page as "phpinfo.
php" in your public_html directory (preferably in a password protected administrative subdirectory):
- PHP: Select all
<?php
phpinfo();
?>