When I rebuilt my video downloader as plain PHP on shared hosting, I spent an afternoon on a decision that looks trivial from the outside: what to call the form fields. The link box is name="url" . The quality dropdown is name="format" . Nothing else. No prefixes, no clever abbreviations, no input1 and select1 . That afternoon was worth it, because those two names now show up everywhere — in the JavaScript, in the tests, in the logs, and in my own head whenever I debug something at midnight.
The link box: name="url"
The first field takes a pasted video link. I could have called it link , video_url , paste_here , or nothing at all. I chose url for three practical reasons.
First, it says exactly what it holds. When I read $_POST['url'] in resolve.php , there is nothing to translate. The value is a URL, the key says URL, and anyone reading the code six months later — usually me — does not have to guess.…