Your $.post statement is inside a closure, but has a reference to the numberInput variable. Since numberInput is only set once when the document has been loaded (which would be a blank string), you'll always be getting the same value when you click the button.
Any of the 2 below should fix it...
Code:
$.post("post.php", { number: $("#numberInput").val() }, function(data) { $("#results").replaceWith(data); }); }
or
senddata = function() {
var numberInput = $("#numberInput").val();
$.post("post.php", { number: numberInput }, function(data) { $("#results").replaceWith(data); }); }
}