The variable name you are using in the javascript is same as that of the post variable name. So change any one of the variable name and try it.
function Print(str) {
$.ajax({
type: "POST",
url: 'ROOMS.php',
data: { userID : str },
success: function(data)
{
alert("success!");
}
});
}