KidsLovePC Contact Us
  Home   PHP  Graphics ASP  JavaScript   J2EE  HTML  JAVA   Swing   Webtip  Forums  Lyric  Free sheet music  Ringtones

Insert data into MySql Database

Use PHPMyAdmin create Database

In the lessonWorking with forms, we collect client's name and phone number and we plan to save this collected information into database.

php tutorial,mysql,phpmyadminFirst step, we need create a database in mysql.( Assume you already installed mysql,php and phpMyAdmin.) Launch your phpMyAdmin in browser by typing http://localhost/phpadmin/index.php(or your setting URL).

On the right panel of phpMyAdmin, you will see a part like the following images:

php tutorial,mysql,phpmyadmin,create database

Input phonebook in "Create new Database" box, click on create. You will see "Database phonebook has been created." in the updated panel and the following image:

create table, php tutorial,mysql,phpmyadmin

Using phpMyAdmin Create table in Mysql database phonebook

create table in phonebook. In the above image, input "contact" in the "Create new table on database phonebook, name" box. Since we need store 2 values, name and phonenumber, we input 2 in number of fields. Then Click on "GO". You will the following updated window:(click on it to see the detail).

create table, php tutorial,mysql,phpmyadmin

Input "name" in the first field, choose "VARCHAR" for type. (varchar means "name" are strings with different length). Check the radio button under that "Key" images. This means "name" is the primary key for this table, no records with same name are allowed in this table.

Input "phonenumber" in the second filed, choose "Varchar" for type. Then click on "save" Button. You will see "Table contact has been created." message on the updated window and the following image:

You may used the above panel to change/update your table setting.

use command line to create database and table

Open a DOS console window, go to c:\mysql\bin.

Type: mysql -u root -p , press enter;

You will see prompt: Enter password:, now enter your password. You will see prompt mysql>

Type: the following command

CREATE DATABASE `phonebook` ;

CREATE TABLE `contact` ( `name` VARCHAR( 50 ) NOT NULL ,
`phonenumber` VARCHAR( 20 ) NOT NULL ,
PRIMARY KEY ( `name` )
) TYPE = MYISAM ;

You will get the same result of using PhpMyAdmin.

 

PHP Calendar
Comprehensive PHP Web Calendar
Configurable PHP Calendar
PHP Calendar
PHP Image Processing
PHP grahic softwares
PHP create real-time dynamic chart
create antispam image(image verification)
Add water mark to image
PHP Image processing introduction
Add text on Image
Create thumbnail for image
Create image from text on fly
PHP code sample
PHP create dynamic PDF with FPDF
PHP create dynamic PDF with PDFLib
PHP create dynamic PDF with ClibPDF
Improved PHP configurable hit counter
Install phpMyAdmin,MySql, PHP
PhpMyAdmin export/import data
A simple PHP RSS feed reader
PHP include (SSI)
Working with Forms
PHP formmail Generator
Using phpMyAdmin Create Database
Insert Form Data into Database
Retrieve data from Database
Retrieve multiple records
Batch insert text using phpMyAdmin
Using phpMyAdmin insert binary file
Insert binary file using PHP code
Using form insert binary file into MySQL
Retrieve binary file from MySQL
Image hosting business in minutes
Send HTML mail in PHP
Send bulk emails in PHP
Polling/Rating System in PHP
Polling/Rating System in PHP(radio button)
Check visitor's IP address
Check reciprocal link
PHP tutorial
What is PHP?
Install PHP on Windows XP (part1)
Install PHP on Windows XP (part2)
PHP open and closing tags
PHP types
Variables
Constants
Operators(part1)
Operators(part2)
Logic Structures
Include files
Loops
Set cookie and delete cookie
Most often used MySQL functions

 

 

Printer Inkjet A Z lyricsLearn ChineseHome|PHP|Swing|HTML|JavaScript|ASP|JAVA|Forum|WebTip|Contact Us
Copyright © kidslovepc.com All rights reserved(new). Privacy|Copyright
designed by info@kidslovepc.com

Please help us cover the web site maintenance fee.
barcode scanner Thermal Printer credit card machine bar code printer