Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   How to retrieve same string saved from database on Linux server? (https://www.warriorforum.com/programming/1080363-how-retrieve-same-string-saved-database-linux-server.html)

davidweb09 4th June 2015 05:13 AM

How to retrieve same string saved from database on Linux server?
 
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.

2WDHost 4th June 2015 04:34 PM

Re: How to retrieve same string saved from database on Linux server?
 
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.

davidweb09 4th June 2015 10:22 PM

Re: How to retrieve same string saved from database on Linux server?
 
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.

2WDHost 5th June 2015 12:12 AM

Re: How to retrieve same string saved from database on Linux server?
 
Check if you have magic quotes set to Off in your php config online.


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