PHP Tutorials

PHP is a backend server programming language that is available on may Linux-based webhosts. It is used in many open source software such as WordPress, Joomla, Drupal and so on. It most often work with MySQL database. Below are some PHP Tutorials:

PHP Proper Logout Code

In Tutorials

To provide a logout function, we have to destroy the session and expire the cookie (if cookies are being used to pass along the session identifier).  Based on the PHP manual, you have something like...

read more

Example of Using PhpMailer to send emails in PHP

In Tutorials

PHP has a default mail() function for sending out emails.  However, the open source PHPMailer Library is much more easier to use.  You don’t have to construct the mail headers yourself, and...

read more

Trying to setup PHP development environment with Vagrant

In Tutorials

We want to set up a PHP development environment.  In the past, we would install the LAMP stack (Linux Apache MySQL and PHP) directly on our machine or use a package like XAMPP, MAMP, or WAMP.  But...

read more

Using Prepared Statement with PHP and MySQL

In Tutorials

In the previous tutorial, we used mysqli API that comes with PHP to query a MySQL database.  In this tutorial, instead of sending a SQL query statement, we are going to use prepared statement to...

read more

Updating MySQL with PHP using mysqli

In Tutorials

This tutorial continues directly from the last tutorial where we inserted an record.  Now we will update the record that was just inserted.  Adding to the previous code, we construct an MySQL...

read more

Using mysqli to insert to MySQL database

In Tutorials

In previous tutorial, we will saw how to query from MySQL database, now we use mysqli to insert to the “example” table of the a MySQL database. Like before, we call mysqli_connect with...

read more

How to Delete a file in PHP

In Tutorials

In the last tutorial, we wrote to a log file called “log.txt” in PHP.  Now we use PHP to delete this file.  Simple do… unlink(‘log.txt’); in PHP.  And the file will...

read more

Tutorial on How to Write to a File in PHP

In Tutorials

In this tutorial, we will show you how to write to a log file in PHP.  Here is a basic function we called “writelog” which takes a $msg message string to be written into a log file...

read more

Tutorial using PHP to Query MySQL

In Tutorials

In this tutorial, we will use PHP to query a MySQL database.  For the purpose of this example, suppose we want to query the last 5 posts from a WordPress MySQL database.  We will need to know the...

read more

Learn Web Tutorials is hosted by Hostmonster and design based on Wordpress template by Elegant Themes
All contents are opinions and are copyrighted and may contain display ads and ad links for which site may receive revenues from.
See Terms of Use and Privacy Policy.

Learn Web Tutorials .com

searching how to sleep better