After you've got your database created (which it sounds like you have) try something like this:
Code:
<?
// assumes $server,$user,$password and $dbname have been defined
@mysql_pconnect($server,$user,$password);
mysql_select_db($dbname);
$tablename = "countries";
$sql = "CREATE TABLE $tablename (
country char(2) NOT NULL primary key,
display char(50) not null
)";
mysql_query($sql) or die("ack! query failed");
$display = addslashes("AFGHANISTAN"); // in case there were single quotes, etc.
$sql = "INSERT INTO countries (country,display) VALUES ('AF','$display')";
mysql_query($sql) or die("ack! query failed");
?>
Please don't be too hard on John (jwm5411). If you're just playing around on your own site, this is a great way to learn, but all too often web designers try to learn on a clients 'nickel'. If you're doing this for a client, please do heed John's advice.