Advertisement

PHP

View:  
Sorted by:  

Add Special Characters to Patterns in PHP Scripts

When you're working with PHP scripts, you sometimes need to compare character strings to see if they fit certain characteristics, rather than to see if they match exact values. For example, you might want [more…]

The php.ini File Controls the Behavior of PHP

The behavior of PHP is controlled through an initialization file called php.ini. Settings such as how sessions are handled, how errors are displayed, and what modules are available are all controlled through [more…]

Common PHP Configuration Changes

Following are some common PHP configuration changes that you might need for a server running PHP, including how to change session parameters and disable functions and classes. [more…]

PHP Template Systems

Template systems can reduce the amount of work that you need to do in PHP to make a website. When you make a website, you frequently use the same layout for the entire site. You have a top portion, maybe [more…]

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…]

Listings:1-2526-5051-7576-94
Advertisement

Sign Up for RSS Feeds

Computers & Software
Win $5,000 and a Personal Consultation with Finance Guru Eric Tyson. Enter Now!

Inside Dummies.com