RE: [PHP] Is it a mysql AND/OR php BUG???
| From: | Mark Roedel | Date: | Wed, 12 Sep 2001 15:07:36 +0000 |
| Subject: | RE: [PHP] Is it a mysql AND/OR php BUG??? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-67052@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Augusto Cesar Castoldi [mailto:accastoldi@yahoo.com.br]
> Sent: Wednesday, September 12, 2001 9:46 AM
> To: Schill, Johannes
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] Is it a mysql AND/OR php BUG???
>
>
> the function isn't decoding right.
>
> > > function decode($decode_str, $pass_str)
> > > {
> > > $encode_str = addslashes($encode_str);
> > > $sql="select decode(\"$decode_str\",
> > > \"$pass_str\")";
> > > echo htmlspecialchars($sql)."<br>";
> > > $data = mysql_query($sql) or die ("Erro crypt
> > 2.");
> > > $row = mysql_fetch_row($data);
> > > return $row[0];
> > > }
Should you maybe be using $decode_str instead of $encode_str in the
first line of this function?
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer | at himself, for he shall never cease
LeTourneau University | to be entertained."
Longview, Texas, USA | -- John Powell