Access a MySQL Database Using PDO

This tutorial will show you how to access a mysql database using the PHP Data Objects interface, also known simply as PDO. One big advantage of using PDO versus other methods is the use of prepared statements which offers much better security than the mysql or mysqli libraries. Also PDO can connect to several different … Read more

Using jQuery to Reorder a List and Update a Database

This tutorial will show you how to use jQuery to allow as list (UL) to be reordered and will also make an AJAX call to a PHP file that will update the database when an item is dropped. I found this useful for a project I was working on recently. The user wanted to be able to change the order that categories displayed in a report. The items are stored in a database with a field called display_order. When the report is generated we simply order by that field.

Sending E-Mail to validate User Sign-up

In on of our last tutorials we covered how to verify that a user’s email address is formatted correctly as well as verify that it goes to a valid domain name. That is great, but still not a great way to make sure a user actually owns or uses that e-mail address. This tutorial will walk you through one method of sending the user an e-mail upon signing up that gives them a link to activate their account.

Editing MySQL Data Using PHP

We have had a few tutorial that show how to display and add data to a MySQL database. Now I am going to show you how to edit a row in your database. In previous examples we setup a table whcih contains: ID, FName, LName and PHON. We will be retreiving the data, making changes, then updating the row in the database. This tutorial is design for the user to update there own information so we will only be editing row for this user.

Simple PHP Website Templates

So you have a basic HTML site with 100 pages, what happens when you want to change the title tag? Well, if you aren’t using PHP includes, you will have to update each file. Wouldn’t it be nice if you could make the change to one file and it would update every page? That is what we will accomplish with our basic PHP template tutorial.

Creating a Form that will Search a MySQL Database

In this tutorial I will show you how to add a simple search box to query a MySQL database. This tutorial is a continuation of the “How to Access a MySQL Database Using PHP” tutorial.
Since writing that original tutorial I have created a local WAMP test environment. I have created the database “test” with a table “testable”. The table contains the following fields:

Setting Up a WAMP Server

This tutorial will walk you through setting up a WAMP Server using software that can be found on sourceforge for use. First, a little description is an order. A WAMP Server is a Windows Machine that has Apache, MySQL, and PHP on it (WAMP – Windows, Apache, MySQL, PHP) To install these before you would have to get the installs and binaries and configure them yourself and set everything up which can be a tedious task as well as very time consuming.