String trouble
From: Pjotr Wedersteers (x33159_at_westerterp.com)
Date: 08/31/04
- Next message: Mark A. Boyd: "Re: Delete row from mysql only deletes the contents?"
- Previous message: Berislav Lopac: "Re: PHP files without extension"
- Next in thread: Ken Robinson: "Re: String trouble"
- Reply: Ken Robinson: "Re: String trouble"
- Reply: Virgil Green: "Re: String trouble"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 31 Aug 2004 15:46:58 +0200
I am using a function that does a very basic encryption (rotation based) of
data.
Data is a string which may contain a..z,A..Z,0..9,[],(),|,{}"', length
limited to 255 chars.
The problem I have is the following:
Let's say my $string is 'This is a string'
At a given moment encrypt ($string) yields '6noq4oq4"q6{o]3' as a result.
When I decrypt that I get my original string back. But if I send the
encrypted string in a POST var, this is what I get:
'6noq4oq4\"q6{o]3'; So the " gets escaped and decrypt produces undesired
results.
I don't want that. I want whatever I am putting in to come out verbatim in
the receiving script.
Which function(s) will help me do this ?
THANKS!
Pjotr
PS I am aware of exisiting PHP hash and encrypt functions. This is for
demonstration purposes only.
- Next message: Mark A. Boyd: "Re: Delete row from mysql only deletes the contents?"
- Previous message: Berislav Lopac: "Re: PHP files without extension"
- Next in thread: Ken Robinson: "Re: String trouble"
- Reply: Ken Robinson: "Re: String trouble"
- Reply: Virgil Green: "Re: String trouble"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|