Unholy Prayer Posted December 10, 2006 Share Posted December 10, 2006 Ok, I'm getting an error with this function and I don't know why. This is the error message that I'm getting: [quote]Fatal error: Cannot redeclare clean() (previously declared in /home/dev/public_html/portal/functions.php:9) in /home/dev/public_html/portal/functions.php on line 9[/quote]These are the contents of functions.php:[code]<?phpfunction clean($string) {$string = addslashes($string);$string = strip_tags($string);$string = htmlspecialchars($string);$string = trim($string);return $string;}?> [/code]Can someone please help me? Quote Link to comment Share on other sites More sharing options...
Psycho Posted December 10, 2006 Share Posted December 10, 2006 It looks as if you are including functions.php in multiple places. Use either include_once() or require_once() to prevent that page from being read twice. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.