Hmm... sometimes, when you pick out strange names for your tables and stuff, weird things can happen. I'm not sure is "primary" is a word that you are allowed to use to name a table. try typing primary instead (notice the backticks [near the ESC button]) also, name is a very strange field name, but I guess it's ok. You may want to try name as well.
What does the errors say?
Try this:
function printDBerror($message = "", &$dbLink)
{
if($dbLink != "")
{
echo "MySQL said: " . mysql_error($dbLink) . "<br>";
}
die(print( $message));
}
function echeckDB($message = "", &$dbLink)
{
if(mysql_error($dbLink) != "")
{
printDBerror($message, &$dbLink);
}
}
$dbLink = mysql_connect("localhost", "root", "redhat");
echeckDB("Could not connect to DB.<br>", &$dbLink);
$sql = "INSERT INTO `primary` (`name`) VALUES ('mine')";
$result = mysql_query($sql, $dbLink);
echeckDB("Here's the query: " . $sql . "<br>", &$dbLink);
echo $sql;
echo $result;