Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Jim Lucas
Jason Pruim wrote: Hi everyone :) So partly to get an answer, and partly to boost my post rankings for the week I have a question. I am attempting to write an authentication function which would query a database, check the username/password and return true if it matches. If it doesn't match

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Thijs Lensselink
Nathan Nobbe wrote: On Jan 25, 2008 3:35 PM, Thijs Lensselink <[EMAIL PROTECTED] > wrote: Change: }return $authenticated; to return $authenticated; } else it will never return the value from the function. But it will always give you u

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Nathan Nobbe
On Jan 25, 2008 3:35 PM, Thijs Lensselink <[EMAIL PROTECTED]> wrote: > Change: > > }return $authenticated; > > to > >return $authenticated; > } > > else it will never return the value from the function. But it will > always give you undefined variable notice nice catch ;) -nathan

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Thijs Lensselink
Jason Pruim wrote: Hi everyone :) So partly to get an answer, and partly to boost my post rankings for the week I have a question. I am attempting to write an authentication function which would query a database, check the username/password and return true if it matches. If it doesn't match

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Richard Lynch
On Fri, January 25, 2008 1:59 pm, Jason Pruim wrote: > Hi everyone :) > > So partly to get an answer, and partly to boost my post rankings for > the week I have a question. > > I am attempting to write an authentication function which would query > a database, check the username/password and retu

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Nathan Nobbe
oh; i just noticed you dont have formal parameters for $user or $pass; so, function authentication($user, $pass) { /// ... then you can remove the first line i put in there on the last post :) } -nathan

Re: [PHP] Functions are driving me crazy....

2008-01-25 Thread Nathan Nobbe
-nathan

[PHP] Functions are driving me crazy....

2008-01-25 Thread Jason Pruim
Hi everyone :) So partly to get an answer, and partly to boost my post rankings for the week I have a question. I am attempting to write an authentication function which would query a database, check the username/password and return true if it matches. If it doesn't match, then it shouldn