I have a problem in which if someone uploads a pic with a ' in the name, it kills the javascript functions in the site. So I have two questions:
What is a simple function that will remove the ' characters from a string?
Can you think of any other characters that will cause havoc in my scripts or HTML?
Thanks!
$filename = "myfile'sname";
ereg_replace("\'", "" , $filename);
I dunno if this is right, try it.
htmlspecialchars() is a PHP function that already exists.