I'd probably use AJAX or some other client side technology for it rather than making a round trip to the server.
If you must do it as 2 separate pages however, have your page post it's form contents to your PHP script that does the look up, then redirect back to your original page with the parameter as a get.
Page1.php
<?php
@$original = $_GET['original'];
@$callback = $_GET['callback'];
if(!isset($callback))
{
?>
<html>
<head>
<title>Page 1</title>
</head>
<body>
<form method="post" action="page2.php">
<input type="textbox" name="number1" />
<input type="submit" name="btnSubmit" />
</form>
</body>
</html>
<?php
}
else
{
?>
<html>
<head>
<title>Page 1</title>
</head>
<body>
<form method="post" action="page2.php">
<input type="textbox" name="number1" value="<?php print $original; ?>" />
<p><?php print $callback; ?></p>
<input type="submit" name="btnSubmit" />
</form>
</body>
</html>
<?php
}
?>
Page2.php
<?php
$number1 = $_POST['number1'];
// do your database stuff here
$number_to_return = "2";
header("Location: page1.php?callback=" . $number_to_return . "&original=" . $number1);
?>
Will do what you want.