$string = str_replace ( ''', '\'', $string );
or
$string = str_replace ( '"' , '\'', $string );
it should work
If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.
Register Today on DNForum IT'S FREE!I am having a problem with ' when it is submitted to PHP through a form, as it comes out as \' instead of '
I tired str_replace and stripcslashes commands and they don't seem to work, is there some way to fix this?
$string = str_replace ( ''', '\'', $string );
or
$string = str_replace ( '"' , '\'', $string );
it should work
That's doesn't work still same problem.
Figured it out, it wasn't the right file anyways.
Last edited by Borghunter; 05-06-2006 at 10:44 PM.
Bookmarks