You have 2 errors:
<?
$number = 3;
echo "enter 3 numbers into the areas below, how can i make
it so when someone hits enter it adds up the three numbers?";
echo "<form action=\"?op=do\" method=\"post\">";
// your action is "?op=do", which will default
// to index.html (or index.php, or whatever
// your index page is.) Since the index page
// is not always this script, you have to
// something like
// action=\"this_script_name.php?op=do\"
for($i=0;$i<$number; $i++) {
echo "<input type='text' name='field[$i]' size='4'> ";
echo "<input type='hidden' name='number' value='$number'><br> ";
}
echo "<INPUT type=submit value=\"enter\">";
echo "</form>";
if($op=="do"){
for($i=0; $i<$number; $i++) {
echo "$field[$i]";
// here you're not adding the three numbers;
// you're just outputting them.
// create a variable that will hold the sum
// and add to that number in every loop.
}
}
?>
Diego