Just simplify your query, no need to include all your current code.
$sql = mysql_query("DELETE FROM tablename WHERE id=$key") or die (mysql_error());
You have way more then you need here:
$delblocksql ="DELETE FROM ur_rooster WHERE r_id=$key";
mysql_select_db($database_U, $U);
$Resultdelblock = mysql_query($delblocksql, $U) or die(mysql_error());
Question, are you estabishing your DB connection from an include or require statement, if so, you do not need to add the variable for it in your query.
mysql_select_db($database_U, $U);