View Single Post
Old 11-28-2008, 10:35 AM   #16 (permalink)
Tanax
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

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.
__________________
Tanax is offline  
Reply With Quote
The Following User Says Thank You to Tanax For This Useful Post:
zxt3st (11-28-2008)