Mystery "rn" showing up in text that comes from da

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Mystery "rn" showing up in text that comes from da

Post by Luke »

For some reason "rn" is being appended to the end of a small description I am pulling out of my database. I can't figure out where it's coming from. It's not from the template... it's not in the database... is rn significant to anybody?
redmonkey
Forum Regular
Posts: 836
Joined: Thu Dec 18, 2003 3:58 pm

Post by redmonkey »

A Windows carriage return after being passed through stripslashes?
User avatar
Popcorn
Forum Commoner
Posts: 55
Joined: Fri Feb 21, 2003 5:19 am

Post by Popcorn »

SQL from PHP INSERTing '\r\n' into the db which is an escaped sequence and so ends up in the db as 'rn' ?? ....
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

yea that's probably it. thanks!

So what should I be passing it through if not stripslashes?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

You shouldn't need to stripslashes() data coming out of the database. If you do, then you likely have a double call to addslashes() or the like when it's being put in.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

thanks feyd... I do in fact have that.
Post Reply