the problem is (as i understand it), the password function is a mySQL
function and not a PHP function, therefor it works in the context of a
mysql_query, but not as a PHP function (which your suggested code calls).
Unless i have actually defined a function 'password()',  calling 'echo
password('$password') will (...does, i just double checked) causes a Fatal
Error 'Undefined Function'.
Nice try tho :)

> From: Alvin Tan <[EMAIL PROTECTED]>
> Date: Tue, 17 Jul 2001 13:07:45 +0800
> To: Brad Wright <[EMAIL PROTECTED]>
> Subject: Re: [PHP] mysql_query problem (more suggestions)
> 
> Then,
> 
> how about this:
> 
> $pw = password($password);
> $sql = "SELECT * FROM login_table where Pass ='$pw'";
> $testResult = mysql_query($sql) or die ("ouch");
> echo $sql;
> 
> this way you can see what sql is talking to the db.
> 
> @lvin
> 
> At 12:59 PM 7/17/01, you wrote:
>> password('$variable') when used in a mysql_query, uses the mysql function to
>> convert the contents of $variable to an encrypted form for keeping in the
>> database.
>> 
>>> From: Alvin Tan <[EMAIL PROTECTED]>
>>> Date: Tue, 17 Jul 2001 12:49:06 +0800
>>> To: Brad Wright <[EMAIL PROTECTED]>
>>> Subject: Re: [PHP] mysql_query problem
>>> 
>>> Hi Brad,
>>> 
>>> Shouldn't it be:
>>> 
>>> $testResult = mysql_query("SELECT * FROM login_table where Pass =
>>> '$password'") or die ("ouch");
>>> ^^^^^^^^^^^^^^
>>> 
>>> unless you have a function called password() you don't need to use the
>>> $password variable within password('$password')
>>> 
>>> HTH,
>>> @lvin
>>> 
>>> At 12:48 PM 7/17/01, you wrote:
>>>> $testResult = mysql_query("SELECT * FROM login_table where Pass =
>>>> password('$password')") or die ("ouch");
>>> 
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to