| | #1 |
| HyperActive Warrior Join Date: 2014 Location: India
Posts: 118
Thanks: 42
Thanked 15 Times in 15 Posts
|
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. |
| |
| | #2 |
| Active Warrior Join Date: 2011
Posts: 96
Thanks: 0
Thanked 26 Times in 25 Posts
|
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. | |
| |
| | #3 |
| HyperActive Warrior Join Date: 2014 Location: India
Posts: 118
Thanks: 42
Thanked 15 Times in 15 Posts
|
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. |
| |
| | #4 |
| Active Warrior Join Date: 2011
Posts: 96
Thanks: 0
Thanked 26 Times in 25 Posts
|
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. | |
| |
|
| Bookmarks |
| Tags |
| database, linux, retrieve, saved, server, string |
| |