Hello guys, how can to make correct query if in the typed values have a special chars (e.g. ' ") ?

If the typed values have a one special char I know how to make the correct query, but if it have more then one special chars then I don't know how to make the correct query... can someone help me ?

Thanks.