I've done some searching on the forums, and have yet to find what I'm looking for. I'm not sure what language to post in, so I'm posting in HTML.

What I need is to be able to grab a section of a URL and pass it into a form text field in the page. For instance, if I visited "mysite.com/MyName", the page would show the same content as I have on "mysite.com", only adding "MyName" to a form field on the page.

An example similar (but not quite) to what I need:
That still does not accomplish exactly what I'm looking for, because of the added variables in the URL itself.

Is there a way to just grab everything after "mysite.com/" and populate a text field with it?

Does this make sense, or do I need to explain this in further detail?

Thanks in advance