multiple forms one page
| From: | Rosie Williams | Date: | Mon, 27 Aug 2012 04:08:43 +0000 |
| Subject: | multiple forms one page | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-318869@lists.php.net to get a copy of this message | ||
Hi all,
I am a newbie to PHP. I have several php forms which were originally on separate pages now included
in the one page. Each form had the following code in it:
function mysql_fix_string($string){ if (get_magic_quotes_gpc()) $string =
stripslashes($string); return mysql_real_escape_string($string);}
function mysql_entities_fix_string($string){ return htmlentities(mysql_fix_string($string));}
However I am only able to include it in one of the forms on the new page with multiple scripts due
to the fatal error that I can only declare the function once. So for testing I have commented these
lines out of the other scripts. I need to know what the security implications of this are? Do the
scripts that do not contain these lines run without it or is it included automatically every time
the database is accessed regardless of which script is accessing it?
If not how do I deal with it?
thanks in advanceRosie