hi!
i have given the modified program below. i didn't check it out in my system. but it should work!! also check out the comments given in the program.
<?php
$db = mysql_connect("localhost", "user", "pw") or die ("Connection to MySQL server localhost failed!");
mysql_select_db("coachin3") or die("Database select fail!");
$query = "CREATE TABLE event ( ";
$query .= "name VARCHAR(25),";
$query .= "date DATE NOT NULL,";
$query .= "type VARCHAR(15),";
$query .= "remark VARCHAR(255)";
$query .= ")";
//create table query
//do not execute this query more than once!
$link = mysql_query($query) or die("Create table query failed!");
//check the "date" format of mysql. u cannot insert '-' in a date column!!
//modify the same below!
//note the slashes added for the remark column.
$row = "INSERT INTO event (name,date,type,remark) VALUES ('Fluffy', '1995-05-15', 'litter', '3 kittens\', \'3 female')";
mysql_query($row) or die("Query failed!");
$row = "INSERT INTO event (name,date,type,remark) VALUES ('Buffy', '1996-25-15', 'litter', '4 dogs\', \'3 female, 1 male') )";
mysql_query($row) or die("Query failed!");
mysql_close ($db);
?>
hope u find it helpful!
-Subhash.
http://www.indiwiz.com/