Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
April 10, 2005, 7:05 pm
rate this thread
I found a function with the following header:
function checkLogin($username = '',$password = '',$groupid =
10,$goodRedirect = '',$badRedirect = '')
Now the writer of this function is calling it by the following statement:
The author of this function wants that $groupid is set to 2. This
doesn't work. But how can I call this function so it does work?
But as I expected that didn't work. So how do I call functions with
default values and I only want to change the middle variable?
Re: calling functions with default values for variables
You will have to provide the arguments preceding the one you want to set.
So, if you want to set the groupid, you should call the function as follows:
checkLogin("", "", 2);
Here, the first and second arguments are set with their default values.