I wrote a script that when you enter a textbox, it will open an invisible iframe to a .php file with $_GET of what they wrote into the textbox.
However, for example, if I type: ‘<3’ in it, this is what happens.

PHP determins that the $_GET[s] is blank! Users cant put a simple <3 symbol without getting that error.
Another problem is quotes, if I write any quotes, it will end the entire SRC property.

What should I do? Should I do something with javascript, or even PHP? Please let me know!
Thanks!
It looks like your iframe is generated by JavaScript, so all those answers that include PHP functions are useless. The data isn’t even reaching PHP, so how can any PHP function hope to help?
Instead, try using
urlencodefrom PHPJS, since none of JS’s functions really handle all cases well, and this makes it easy for you to use PHP’surldecodeto retrieve the data.