<?php
//Replace the value in [' '] to be the name of the textbox you declared in the form file.
$number = $_POST['number'];
//Empty?
if ($number < 1)
{
echo 'You have to type a number!';
exit;
}
//Not a number?
if (!is_numeric($number))
{
echo 'You must type a NUMBER.';
exit;
}
//Put some code here to verify if you need the number to be between a certain amount.
//If you don't want decimals, you may want to check for those too.
//Redirect the user now.
header ('Location: http://amazon.com?id='.$number);
//Done!
?>