home *** CD-ROM | disk | FTP | other *** search
- <HTML>
- <HEAD>
- <TITLE>Creating a table</TITLE>
- </HEAD>
- <BODY>
-
- <?php
-
- $DBName="yourdatabasenamedb";
- $TableName="chooseaname";
-
- $mysql_link=mysql_connect("localhost","username","password");
-
- $Query="CREATE table $TableName (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, Date TEXT, Headline TEXT, Introduction TEXT, Story TEXT)";
-
- if (mysql_db_query ($DBName, $Query, $mysql_link)) {
- print ("The table was successfully created!<BR>\n");
- } else {
- print ("Sorry but the table could not be created<BR>\n");
- }
- mysql_close ($mysql_link);
-
- ?>
-
- </BODY>
- </HTML>
-