Below are 2 blocks of on the Post Response right out of the text book.
When I run these in the W3 Schools web site, they work fine, When I run these on my own computer they don’t work. No data transfers to the .php POSTfile,
Just to add it would be worth looking at XSS attacks. If you just echo out variables that are entered by users they can load bits of JS and other html.
I think i’m correct in saying you should at htmlentities at least and really look at adding other checks to any variables that are echo’d out. e.g