Time and Date Functions in MySQL

March 12, 2011

Working with dates and times in MySQL is straightforward and there are several MySQL functions to do the calculations for you. Some of the most common requirements are to calculate the current date and time, and this can be done with the CURRENT_DATE() and NOW() functions like this: {code type=php} mysql> SELECT CURRENT_DATE(); 2011-03-01 mysql> […]

Read More

PHP Tips and Tricks

March 11, 2011

PHP: Hypertext Preprocessor is a scripting language that is a great tool for web developers to use when they want to produce dynamic web pages. Embed your PHP code into the HTML source and the PHP processor on the web server interprets it and generates the web page document. It does not matter if you […]

Read More

Other Ways to Hide PHP Usage

March 10, 2011

There are a few other methods that you can use to hide your usage of PHP from visitors to your website. Another trick is to use filenames without extensions and then tell Apache to process them as a PHP file. This can be done easily by amending your .htaccess file to include the following lines: […]

Read More

Hide PHP Usage

March 9, 2011

If you are the web developer for a site, then you might not want visitors to know that you are using PHP for your scripting. One simple way around this is to use a different extension for the PHP files instead of the default .php. You can use any extension that you want including: .htm […]

Read More

Send an email from PHP

March 9, 2011

It is common now for developers to use email as a means of communicating with users from the web site. There are many reasons that you might want to do this including: Confirmation of user action Password reset Send error logs to site administrator Before you start to configure your PHP scripts to send email, […]

Read More

Get the Apache and PHP Version Info

March 9, 2011

If you are developing PHP code for a website you might sometimes want to check which version of Apache or PHP will be running the website. This is particularly true if you use some functionality that was included at a particular revision of the software or if you want to avoid security holes that were […]

Read More

Create an image on the fly with the GD library

March 8, 2011

If your website has a lot of images it is often convenient to create and show a dynamic thumbnail image. This will save on processor and download time for your visitors and they only have to download the images they want to see. One great tool to do this is the GD library. Before you […]

Read More