Posts Tagged with PHP
0
There are times where you need to validate a form to a data stored in a database without the need to submit the form beforehand. The solution - Ajax (shorthand for asynchronous JavaScript and XML). For example, you are creating a user registration form where obviously, the username to choose from needs to be unique. Instead of validating the username after form submission, wouldn’t it be much friendlier if the form can validate itself from the server asynchronously in the... Continue Reading
0
Tonight I was stumped when I received a call from a client about mising albums from his website. I thought maybe it was just some minor error which I can easily fixed but it turned out somebody had ‘hacked’ the website. After further investigation, I concluded that this person had probably scanned the admin site and figured the php file that deletes the album. I’ve made a mistake of not placing the ‘exit’ function to stop the php script from running if accessed directly unauthenticated... Continue Reading
0
This class written in PHP is very useful when you want to display random images in your website. I’ve used this class to generate the Homepage image for an image gallery website. Because the homepage requires the image to be large and must follows specific width to caters the design, in this example 800px, then the class will need to have the following method: Get random row from uploaded images > get the filename and caption> check the file’s width >... Continue Reading
1

