Well, this is the code I'm using to add records to my db
#connect to mysql
$connection = @mysql_connect("localhost","user","pass")
or die("Sorry, unable to connect to MySQL");
#select db
$result = @mysql_select_db(mydb,$connection)
or die("Sorry, unable to to get database.");
#--------------
# submit data
#--------------
if($_POST['submit'] and $title and $art)
{
#create query
$sql="insert into mydb(author,title,art) values(\"$author\", \"$title\", \"$art\")";
#execute query
$result=mysql_query($sql,$connection);
#success?
if(result){
$url=$PHP_SELF .'?processed=' .$title;
print "<html><head><meta http-equiv='Refresh' content='1; url=$url'></head></html>";
die("<b><font size=2 face=verdana color=red> Record $title submitted for approval</font></b>");
}
else
{
echo(" Record was not added successfully!");
}
}
and the db has one table with the fields: ID#, author, title, art, approved. I don't really know what else to post as the script and db structure is very simple.
Thanks again.