PHP

View:  
Sorted by:  

How to Create a PHP Template Class

The heart of the template system is a PHP class that's responsible for gathering together the various parts of a given page. The Page class includes a few methods and properties. You instantiate the [more…]

How to Create the Top of the Page with a PHP Template

The top of the page is one of the more complex sections for a PHP template system to handle. The top of a web page contains the document type declaration [more…]

How to Create the Bottom of the Page with a PHP Template

Before you create the bottom of the page in a PHP template form, you first need to create the top of the page. With the top of the page created in template form, create the bottom by following these steps [more…]

How to Connect the Top, Bottom, and Middle of a PHP Template

When you are building a PHP template system, you start with the top of the page, and then create the bottom of the page. Weirdly enough, you leave the middle to the end. Here's how you bring it all together [more…]

How to Build an About Page on a PHP Template

Building an About page for your PHP template system is a simple matter of creating a new file, instantiating the Page class, and adding content. Follow these steps: [more…]

How to Build a Contact Page on a PHP Template

Contact pages for websites sometimes include other elements, maybe a form or another way to interact. This means you might need to include another JavaScript file or different CSS. Luckily, you can do [more…]

How to Start Sessions in PHP with a Prepended File

In order to use sessions, you need to call the session_start() function on every page that will use sessions. This can be cumbersome, especially if you're trying to tack sessions onto several PHP programs [more…]

Reuse Code in PHP Programs through Functions

You can, with the help of an auto_prepend_file, create a functions file that's automatically included within all your PHP programs. These functions might be something as simple as starting a session or [more…]

How to Perform PHP Validation

Your overall goal is to make sure that any input received from the user, whether from a web form, a web service, or elsewhere, is checked and sanitized through PHP validation. [more…]

Validate Drop-Downs, Radio Buttons, and Check Boxes in the PHP

Validating web form data from drop-downs (or select/option elements), radio buttons, or check boxes should be done in the PHP. Even though it may appear that the users have to pick from one of the options [more…]

How to Remove MySQL Accounts

You might want to remove an account from a MySQL database. In most cases, having an account that no one uses doesn’t have any negative effects. However, if you think an account has been compromised, you [more…]

How to Back Up Your MySQL Database

You need to have at least one backup copy of your valuable MySQL database. Disasters occur rarely, but they do occur. The computer where your database is stored can break down and lose your data, the computer [more…]

How to Restore Your MySQL Data

At some point, one of your MySQL database tables might become damaged and unusable. It’s unusual, but it happens. For instance, a hardware problem or an unexpected computer shutdown can cause corrupted [more…]

Periodic Upgrades of MySQL

New versions of MySQL are released periodically, and you can upgrade from one version of MySQL to a newer version. You can find upgrading information in the [more…]

How to Choose the Data for Your MySQL Database

To design a MySQL database, you first must identify what information belongs in it. The database must contain the data needed for the website to perform its purpose. Here are a few examples: [more…]

How to Organize the Data for Your MySQL Database

MySQL is a Relational Database Management System (RDBMS), which means the data is organized into tables. RDBMS tables are organized like other tables that you’re used to — in rows and columns, as shown [more…]

How to Create Relationships between MySQL Tables

Some tables in a MySQL database are related. Most often, a row in one table is related to several rows in another table. You need a column to connect the related rows in different tables. In many cases [more…]

How to Store Different Types of MySQL Data

MySQL stores information in different formats, based on the type of information that you tell MySQL to expect. MySQL allows different types of data to be used in different ways. The main types of data [more…]

Design a Sample MySQL Database

In this exercise, you design a sample MySQL database to contain customer order information. Create the following list of information that you want to store for each customer: [more…]

Add MySQL Data One Row at a Time

If you have a small amount of data to add to your MySQL database, you can add one row at a time to the table. PHP scripts often need to add one row at a time. For instance, when a PHP script accepts the [more…]

How to Add a Bunch of MySQL Data

If you have a large amount of data to enter in your MySQL database and it’s already in a computer file, you can transfer the data from the existing computer file to your MySQL database. [more…]

Retrieve Information from a MySQL Database

The only purpose in storing information in a MySQL database is to have it available when you need it. A database lives to answer questions. What products are for sale? Who are the customers? How many customers [more…]

How to Retrieve Data from Specific Rows in MySQL Databases

Frequently, you don’t want to retrieve all the information from a MySQL table. You want information only from selected rows. Three SQL words are frequently used to specify the source of the information [more…]

Combine Information from Multiple MySQL Tables with UNION

You can combine information to from more than one MySQL table by using the UNION query. With UNION, rows are retrieved from one or more tables and stored together, one after the other, in a single result [more…]

Combine Information from Multiple MySQL Tables with JOIN

You can use a JOIN SELECT query to combine information from more than one MySQL table. With JOIN, the tables are combined side by side, and the information is retrieved from both tables. [more…]

Listings:1-2526-5051-7576-100more...

Sign Up for RSS Feeds

Computers & Software
Win $500. Easy. Enter to win now.

Inside Dummies.com

Dummies.com Sweepstakes

Win $500. Easy.