Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting an url encoded string

Status
Not open for further replies.

maslett

Technical User
Mar 11, 2004
121
GB
Hi, I have an URL encoded string such as:

Code:
line++++1%0D%0A%0D%0Aline+2%0D%0A%0D%0Aline+3

that equates to

Code:
line    1

line 2

line 3

What I need to do is write the string to mysql but *also* keep the formatting as I have to display the string on a web page at a later date.

I'm stumped!

(btw - am trying to write this in perl)

Cheers,
Matt
 
You could use 2 fields, one encoded, the other unencoded. Alternatively (and better if you can manage it, because it eliminates redundancy), just store it encoded, and decode it every time you access it.
 
Now why didn't I think of that?

Thanks Tony :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top