1 - please post code using the proper forum code tags (php & /php wrapped in square brackets)
2 - You obviously have not read anything on how to write or use html. Your form tag determines whether you will be using GET or POST. The default is GET so your first (bad) example would use $_GET when retrieving input
3 - Your 2nd example would not retrieve anything.
Your script is atrocious. So - it begins by outputting a form. And then it goes on to try and retrieve the input from that form. Have you thought about how that looks? It's like a one-sided conversation. You ask the question and then attempt to get the answer before the user evens reads it.
You apparently have never coded before or you would realize that your 6th line of code is meaningless. When trying to determine the length of something with a function call you need to either do it with an if statement or else save the returned value. You needlessly repeat your effort the proper way, although the comparison you are doing could be done simpler without the double quotes on the numeric value you are seeking since the returned value is a number, not a string.
You have a long way to go. I hope you decide to do some reading and learning rather than mindlessly grabbing other's code samples and trying them out without knowing anything about how they work. Good luck.