Hey, error that I can't seem to wrap my head around... it doesn't make sense for me.
I am running PHP 5 and when this is the error it prints:
Fatal error: Cannot redeclare sanitizeinput() (previously declared in (dir...)\includes\functions.php:3) in (dir...)\includes\functions.php on line 77
My function, sanitizeInput($string) takes a string, and returns a string variable.
What I don't understand is that it says on line 77(which is just simply an ending bracket to close the function).
Another thing that doesn't make sense, is that it says "Cannot redeclare sanitizeinput()" with empty parameters when my function suppose to accept 1 parameter.
That is all that information that I can think of right now that is relevant, if you should know anymore, please just ask.
Appreciate any help
-----------------------------------------------------------------------------------
I actually found out my problem... Here is the solution if anyone else was having the same issue.
This error occured for me because I had my functions.php file being included multiple times, causing the script to run into a redeclare error.
Last edited by Sakizen; 02-17-2010 at 04:00 PM. Reason: Found the solution
A good thing to avoid that, is to use include_once() instead of include(). include_once() will check if the file is included already, and if it is, it just does nothing.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks