chitika

Sunday, September 11, 2011

How to create database table in php?

This site provides users with the information about php, create database table, how to create database table, create db table, how to create db table, and more.

If you think that this site is helpful, please recommend your friends to visit our site.

How to create database table in php?

The following is the code to create db table in php:

--------------------------------------------------------------------------------
< ?php

    /* Connecting, selecting database */
    $link = mysql_connect("localhost", "bobsmith", "JM8t") or _
    die("Could not connect");

    /*print "Connected successfully";*/
    mysql_select_db("bobsmith") or die("Could not select database");

    mysql_query("create table record(Name VARCHAR(20), Sex VARCHAR(1), _
    Age VARCHAR(2), Country VARCHAR(20), Education VARCHAR(20), _
    Hobby VARCHAR(40), Email VARCHAR(40))");

    print("Database table created!");

? >
--------------------------------------------------------------------------------

No comments:

Post a Comment

For other hundreds of computer repair tips, tricks, tweaks, guide, help, please go to


http://website.edusoftmax.com