Error with placing quotes on the screen
Posted: Mon Apr 30, 2007 1:19 pm
Does anybody here know the solution to the following problem?
By means of a php script I retrieve data from a mysql database and then place the data on the screen. However sometimes the ' and " are placed incorrectly on the screen as \' and \" and other times these characters are placed on the screen correctly as a ' en ". So when I reload the page from the webserver via internet in the browser this sometimes goes correctly and other times goes incorrectly. When I execute the same script locally on my own computer the above mentioned error does not occur. The webserver uses mysql 5.0.27 en php 4.0.6. Locally on my own computer I use php 4.0.5, mysql 3.23.32 and apache 1.3.14.
I've also tried the stripslashes() function but with no success.
By means of a php script I retrieve data from a mysql database and then place the data on the screen. However sometimes the ' and " are placed incorrectly on the screen as \' and \" and other times these characters are placed on the screen correctly as a ' en ". So when I reload the page from the webserver via internet in the browser this sometimes goes correctly and other times goes incorrectly. When I execute the same script locally on my own computer the above mentioned error does not occur. The webserver uses mysql 5.0.27 en php 4.0.6. Locally on my own computer I use php 4.0.5, mysql 3.23.32 and apache 1.3.14.
I've also tried the stripslashes() function but with no success.