Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 4th Jun 2015, 05:13 AM   #1
HyperActive Warrior
 
Join Date: 2014
Location: India
Posts: 118
Thanks: 42
Thanked 15 Times in 15 Posts
Default
How to retrieve same string saved from database on Linux server?
Share on: 
fb share twitter share gplus share more share

Hello frnds,

I have an issue with fetching inserted data from database. I have inserted a string CENTRALIZER,MOTOR 5.50" OD 3SS into database in PHP But when i try to fetch it from database on Linux server. It showing result like as:-
CENTRALIZER,MOTOR 5.50\" OD 3SS i.e. not same as above.

Please help how to fix to fix this issue online on Linux server.
davidweb09 is offline  
Unread 4th Jun 2015, 04:34 PM   #2
Active Warrior
 
2WDHost's Avatar
 
Join Date: 2011
Posts: 96
Thanks: 0
Thanked 26 Times in 25 Posts
Default
Re: How to retrieve same string saved from database on Linux server?
Share on: 
fb share twitter share gplus share more share

Hi.

You can use PHP stripslashes() function on retrieved string. But I would recommend you to:
a). replace \" with " in your DB records
b). fix your PHP code so it will insert " instead of \" into DB.

2WDH.com: Professional cPanel Hosting since 2003
Really helpful support. You're not a number to us! Programming, database and site development help.
No overselling. SSD. Real 99.99%+ uptime. Free 2-week trial: no obligation/credit card required.
2WDHost is offline  
Unread 4th Jun 2015, 10:22 PM   #3
HyperActive Warrior
 
Join Date: 2014
Location: India
Posts: 118
Thanks: 42
Thanked 15 Times in 15 Posts
Default
Re: How to retrieve same string saved from database on Linux server?
Share on: 
fb share twitter share gplus share more share

I have used all, working on same error from last week. It works on my local host But error on online Linux server.

You can use " in any string & insert it into database, When you fetch it from database it returns value with additional \ before " into string. You can yourself with any code just do above task online.
davidweb09 is offline  
Unread 5th Jun 2015, 12:12 AM   #4
Active Warrior
 
2WDHost's Avatar
 
Join Date: 2011
Posts: 96
Thanks: 0
Thanked 26 Times in 25 Posts
Default
Re: How to retrieve same string saved from database on Linux server?
Share on: 
fb share twitter share gplus share more share

Check if you have magic quotes set to Off in your php config online.

2WDH.com: Professional cPanel Hosting since 2003
Really helpful support. You're not a number to us! Programming, database and site development help.
No overselling. SSD. Real 99.99%+ uptime. Free 2-week trial: no obligation/credit card required.
2WDHost is offline  
Closed Thread


Bookmarks

Tags
database, linux, retrieve, saved, server, string


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 01:50 PM.