This is returning undefined, even though var roommate contains the correct value:
JS
roommate = $("#roommate").val();
$.post('roommateSearch.php', 'val=' + $(roommate).val(), function (response) {
alert(response);
});
roommateSearch.php
<?php
$roommate = $_POST['val'];
echo "I got your value!".$roommate;
?>
roommates is holding a value so you can use it like this
'val=' + roommateNo fancy jquery around it.