How to retrieve same string saved from database on Linux server?

3 replies
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.
#database #linux #retrieve #saved #server #string
  • Profile picture of the author 2WDHost
    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.
    {{ DiscussionBoard.errors[10098056].message }}
  • Profile picture of the author davidweb09
    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.
    {{ DiscussionBoard.errors[10098443].message }}
  • Profile picture of the author 2WDHost
    Check if you have magic quotes set to Off in your php config online.
    {{ DiscussionBoard.errors[10098558].message }}

Trending Topics