Make sure you use braces around your array variables(or concatenate them) inside of a string:

echo "Set: {$setinfo['setname']} created";
// or
echo 'Set: ' . $setinfo['setname'] . ' created';
Also, to optionally take debugging a little further you can use mysql_affected_rows() (http://php.net/mysql_affected_rows) on MySQL UPDATE/INSERT/DELETEs to make sure the row was updated/inserted/deleted:

if(mysql_affected_rows() == 1) // 1 for this case; could be more with other queries
{
// echo success?
}
else
{
// error
}
And if you need the ID from the auto_increment column you can get it with mysql_insert_id() (http://php.net/mysql_insert_id).

GJay

12-31-2007, 11:11 AM

assuming setname and setdesc are strings, you'll want to put them through mysql_real_escape_string() before going anywhere near the database