D & M Computer Service
 

News

Navigation Hosting Plans Domain Registration Software e-Commerce Hosting Plans Contact D & M Computer Service

PHP/MySQL Tutorials

PHP/MySQL Tutorial
What is PHP?
What is MySQL?
Creating MySQL database/user
Removing MySQL database/user
phpMyAdmin
MySQL Backup/Restore
MySQL Access Host
Connecting PHP and MySQL
Connecting to the Database
Executing Commands on Server
Displaying Table Data
Selecting Individual Records
Zend Optimizer
Pear Modules
Other Tutorials

PHP/MySQL Tutorial - PHP MySQL Connection

PHPinfo

One of the most basic PHP tags is the PHPinfo. Open just any text editor (like notepad) and type in the following:

<?
phpinfo();
?>

And save it as phpinfo.php

Now upload this to your public_html directory and go to it in your browser using the following link:

http://yourdomain.com/phpinfo.php

You will see a huge page with all the details of the PHP installation on it, scroll down through all this information and you will see a section where the MySQL details are fitted.

Before you can do anything with your database, you must create a table. A table is a section of the database for storing related information. In a table you will set up the different fields which will be used in that table. Because of this construction, nearly all of a site's database needs can be satisfied using just one database.

Creating a table in PHPMyAdmin is simple, just type the name, select the number of fields and click the button. You will then be taken to a setup screen where you must create the fields for the database. If you are using a PHP script to create your database, the whole creation and setup will be done in one command.

New

Creating a table in PHP is slightly more difficult than with MySQL. It takes the following format:

CREATE TABLE tablename {

Fields

}

The fields are defined as follows:

fieldname type(length) extra info,

The final field entered should not have a comma after it.

Other helpful Links



Web Design only Business Marketing Internet Marketing
Web Hosting only Search Engine Optimization Design Site yourself
Web Design & Hosting e-Business Solutions Web Application Development
e-commerce Solution Website Builder FAQ's Tutorials



RJL International Inc.

Here are a few qualifications
our design team has to offer.
Certified International Webmasters

Dreamweaver certified
Joomla Designer
Certified Search Engine Optimization
Certified in Anti Spam protection
Cold Fusion Designers


Discover Card
Visa Card
Master Card

Copyright © 1997 - 2008 D & M Computer Service. All rights reserved RJL International, Inc.

Navigation sitemap Privacy Terms Software Domains D&M Computer Service Hosting