Updated php to handle apostrophes

Fixed the php so that input with apostrophes will be sanitized, by
replacing all occurrences of ' with ''.