11-28-2008, 10:35 AM
|
#16 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Yes you can use the same variable name on all functions.
However, there already is a function called "stripslashes" for example, and you cannot use the same name as an already existing function. I would suggest you to "merge" the 2 functions to a function called something like "secure".
I also thought about something in your updated code. You don't actually check if the connection succeeded, so I would suggest you to do something like
PHP Code:
if($this->link) //meaning the connection returned true.. { return true; } else return false;
and put that in your connect function for a better structure and errorclearing.
__________________
|
|
|
|