Kicked out an error--
$query = "SELECT contactid from $table_name where id=$id";
$result = mysql_query($query) or die("Cannot check for existing ID " . mysql_error());
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Has something to do with mysql_query, I think. Does that relate to an older version and has been deprecated?