PHP

View:  
Sorted by:  

PHP Functions That Communicate with MySQL

PHP provides two sets of functions for communicating with MySQL — the mysql functions and the mysqli (MySQL Improved) functions. Which functions you use depends on the version of MySQL and PHP you’re using [more…]

How to Connect to the MySQL Server

Before you can store or get any data, you need to connect to the MySQL database, which might be on the same computer as your PHP scripts or on a different computer. You don't need to know the details of [more…]

How to Send an SQL Server to the MySQL Server

After you have an open connection to the MySQL server, you send your SQL statement query. To interact with the database, put your SQL statement into a variable and send it to the MySQL server with the [more…]

How to Send Multiple Queries to the MySQL Server

Sometimes, you want to send two or more queries to the MySQL server at the same time. MySQL allows you to do so, but you need to use a different function to send the queries. You can send multiple queries [more…]

How to Select a MySQL Database

If you don’t select the MySQL database in the connect function, you can select the database by using the mysqli_select_db function. You can also use this function to select a different database at any [more…]

How to Convert mysqli Functions to mysql Functions

You’re probably using PHP 5 or later with the mysqli functions to interact with MySQL 5.0 or 5.1. If you’re using PHP 4, the mysqli functions aren’t available. Instead, you use the mysql functions, even [more…]

How PHP Works

The PHP software works with the web server, which is the software that delivers web pages to the world. When you type a URL into your web browser’s address bar, you’re sending a message to the web server [more…]

The Structure of a PHP Script

PHP is an embedded scripting language when used in web pages. This means that PHP code is embedded in HTML code. You use HTML tags to enclose the PHP language that you embed in your HTML file — the same [more…]

PHP Syntax

The PHP section that you add to your HTML file consists of a series of PHP statements. Each PHP statement is an instruction to PHP to do something. PHP statements can be divided into simple or complex [more…]

The Basics of Writing PHP Code

PHP code must be read by humans, as well as by the PHP software. PHP scripts are written by humans and must be modified, updated, and maintained by humans. The script might need to be modified a year or [more…]

How to Display Content in a Web Page with PHP

You display content on your web page with PHP echo or printstatements; they both do the same thing. An echo or printstatement produces output, which is sent to the user’s browser. In fact, the browser [more…]

How to Name a PHP Variable

Variables are containers used to hold information. PHP variables have a name, and information is stored in the variable. For instance, you might name a variable [more…]

How MySQL Works

The MySQL software consists of the MySQL server, several utility programs that assist in the administration of MySQL databases, and some supporting software that the MySQL server needs [more…]

Database Structure and MySQL

MySQL is a Relational Database Management System (RDBMS). Your MySQL server can manage many databases at the same time. In fact, many people might have different databases managed by a single MySQL server [more…]

The Basics of Communicating with MySQL

All your interaction with the database is accomplished by passing messages to the MySQL server. The MySQL server must be able to understand the instructions that you send it. You communicate using [more…]

How to Use the mysql Client

When MySQL is installed, a simple, text-based program called mysql (or sometimes the command line interface or the CLI) is also installed. Programs that communicate with servers are [more…]

Protect Your MySQL Databases

You need to control access to the information in your MySQL database. You need to decide who can see the data and who can change it. If a bad guy gets a list of your customers' private information [more…]

MySQL Administrator Responsibilities

Administering MySQL encompasses the tasks required to ensure that MySQL can perform its data management duties in an efficient and secure manner. You might be responsible for some or all of the administrative [more…]

How to Control Access to Your MySQL Data

You need to control access to the information in your MySQL database. You need to decide who can see the data and who can change it. Imagine what would happen if your competitors could change the information [more…]

MySQL Account Names and Hostnames

Together, the MySQL account name and hostname (the name of the computer that’s authorized to connect to the database) identify a unique account. Two accounts with the same name but different hostnames [more…]

MySQL Passwords

A password is set up for every MySQL account. If no password is provided for the account, the password is blank, which means that no password is required. MySQL doesn’t have any limit for the length of [more…]

MySQL Account Privileges

MySQL uses account privileges to specify who can do what. Anyone using a valid account can connect to the MySQL server, but he or she can do only those things that are allowed by the privileges for the [more…]

The MySQL Security Database

When MySQL is installed, it automatically creates a database called mysql. All the information used to protect your data is stored in this database, including account names, hostnames, passwords, and privileges [more…]

How to Identify What MySQL Accounts Currently Exist

To see your MySQL account information, you can execute an SQL query, using the mysql client. To see what accounts currently exist for your database, you need an account that has the necessary privileges [more…]

How to Add MySQL Accounts

The preferred way to access MySQL from PHP is to set up an account specifically for this purpose with only the privileges that are needed.

If you're using an account given to you by a company IT department [more…]

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

Sign Up for RSS Feeds

Computers & Software
Great Gadget Giveaway -- Enter to Win!

Inside Dummies.com