Scroll page back to the top

PHP and MySQL Tutorials

Enforce 'www.' on domain name with .htaccess

Enforce 'www.' on domain name with .htaccess

Today we will have a look at how we can enforce 'www' on the domain name. When someone types: domain.com it will automatically convert it to www.domain.com.

Sebastian Sulinski on 27th Oct 2011

Read now!
Date range with PHP DateTime, DateInterval and DatePeriod

Date range with PHP DateTime, DateInterval and DatePeriod

Today we will take a look at how we can generate an array with the range of dates using the PHP's DateTime, DateInterval and DatePeriod classes.

Sebastian Sulinski on 19th Oct 2011

DemoRead now!
Time difference function with PHP

Time difference function with PHP

In this tutorial we will have a look at the function which calculates the difference between two timestamp values and returns the string like '20 seconds ago', '1 week ago', '2 years ago' etc.

Sebastian Sulinski on 9th Oct 2011

Read now!
Increase website performance with Apache mod_deflate

Increase website performance with Apache mod_deflate

In this tutorial we will learn how to use Apache's mod_deflate in order to compress the output from the server before sending it to the client over the network.

With mod_deflate you can compress files to approximately 20% - 30% of their original sizes, save your server traffic and increase the performance of the website.

Sebastian Sulinski on 7th Oct 2011

Read now!
Dependable dropdown menus with jQuery and PHP

Dependable dropdown menus with jQuery and PHP

Today we will take a look at how we can create a dependency between the dropdown menus in our form.
Based on the previous selection, the following menu is filled in with relevant data and so on. In order to create it we will use jQuery.getJSON() method and PHP with PDO and MySQL database.

Sebastian Sulinski on 23rd Sep 2011

DemoWatch now!
Useful Linux shell (ssh) commands

Useful Linux shell (ssh) commands

Today I will give you an overview of a useful ssh commands, that every web developer should be familiar with.
We will have a look at how you can copy files and folders, how you can move them from one location to the other, how you can remove folders and files, how you can change permissions and ownership of the folder and a few more commands that will make your life easier when dealing with your files on the Linux web server.

Sebastian Sulinski on 22nd Sep 2011

Read now!
MySQL counting, total, average and value range

MySQL counting, total, average and value range

In this short series we will have a look at the very useful functions inside of MySQL database, which allow us to deal with numerical values such as quantities, prices etc. We will have a look at COUNT, SUM, AVG, ROUND, MIN and MAX functions in order to get totals, average, minimum, maximum values and price range from our books table.

Sebastian Sulinski on 19th Sep 2011

Watch now!
MySQL INSERT INTO SELECT and TRANSACTION

MySQL INSERT INTO SELECT and TRANSACTION

Today we will have a look at MySQL and its INSERT INTO SELECT statement in order to copy records across to another or within the same table as well as TRANSACTION statement, which allows us to execute several SQL statements in one go.

Sebastian Sulinski on 15th Sep 2011

Watch now!
Export MySQL table as CSV with PHP

Export MySQL table as CSV with PHP

Today we will look at how we can export MySQL table and its specific fields as CSV file using PHP. Our export option will allow you to select the fields you wish to export after initial selection of the table from the database.

Sebastian Sulinski on 12th Sep 2011

Watch now!
Two-layered online form validation with jQuery and PHP

Two-layered online form validation with jQuery and PHP

In this tutorial you will learn how to apply two layers of validation to your online form. First layer is the client based javascript validation and the second one - server site validation. Using this approach we are saving the use of the bandwidth and number of calls made to the server.

Price: $42.49 USD

Sebastian Sulinski on 6th Sep 2011

Read more