In order terms, the only thing you should keep in mind is the structure itself. Separate scripts PHP of HTML, and so on.
You should also keep in mind that scripts HTML will only be responsible for static content, if you say that this is an online store, there is no reason to force the use of HTML and JS for tasks of PHP, and in the same way, there is no reason to force the PHP generating large amounts of code HTML, since you can use, and I recommend using files with the extension .php
, even if they are only responsible for the login form, I believe that a few bytes will not make so much difference.
Anyway, you wouldn’t exactly be organizing your code, you’d be organizing your files. To organize the codes I recommend that you use classes or simply functions, as this is an online store all security is low, just remember this.
If you want to, and you’re definitely going to want to improve the structure, then you should use structures that are already ready, because in addition to being programmed by professionals, thousands of people have already evaluated them, or if you prefer to go old school, you will have to make a lot more effort than choosing where to put the login form.
The order you will make is irrelevant, just do it the way you can test as you develop.
– RFL
Why not start from a base already consolidated, as Magento ?
– gmsantos
PHP "embeds" html (and often other content), then a page. php supports html content of course, see this answer: http://stackoverflow.com/a/18140338/1518921
– Guilherme Nascimento