August 4th, 1999, 05:02 AM
i'm pretty new to php (started last night but i have experience with perl, asp, c, java, name it..
so i started coding a php guestbook (not really useful, but good to start learning). so i found out how to write to files and stuff, BUT (!!) whenever i write a string to a file that contains a " or a ' it writes that, but with a (backslash) before it. i tried using set_magic_quotes_runtime but it didn't seem to work, it's really kinda annoying.
anyone knows how to get rid of this?
August 5th, 1999, 05:50 AM
Use stripsplashes() on the string before you write it to the file:
$string = stripslashes($string);
August 5th, 1999, 07:45 AM
i knew it wouldn't be hard