March 15th, 20170820In PHP, there are a variety of ways in which you can sanitize the user input, depending on your needs. The htmlspecialchars function allows you to transform every special character in HTML into text so that the user cannot enter code in his input. It is good to use the function when you want to show a user input, stored or coming from...
March 15th, 20170282The tel input type stands for telephone while the others should be self-evident. It is good to start using them where appropriate as there are subtle differences in the browsers when you use them. For example, on a mobile phone the tel input type might show the numbers first in the user’s browser and the date and time input types would...
March 15th, 20170488You can be more specific, for example, by stipulating image/png instead of the wildcard image/* which accepts all kinds of images. When you add the accept attribute and the user is shown the file dialog, he would be able to select only files from that particular type with some browser magic.
March 15th, 20170205When creating pages, it is important for your website to be valid. That means there should be no errors in the HTML code of your webpages. This is not mandatory but it will provide a boost for your website; both in terms of consistency and search engine rankings.
March 15th, 20170309Use objects/classes to encapsulate your application logic and try not to pollute the global variable scope as this can cause frustrating problems such as libraries not working from variables being overridden.
Below is an example how you can structure your application’s logic in a simple way without polluting the global scope.
March 15th, 20170181Some basic HTML tags developers/designers use regularly explained below.
1. - you can use it for longer, multi-lines quotations from a different source than the rest of the content. They are usually indented by browsers