a una caja de texto entonces podria ser
Cita: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
</head>
<body>
<?php
if(empty($_POST['submit']))
{?>
<form id="form1" name="form1" method="post" action="mostrar_lista.php">
<label></label>
<label>comensale
<input type="text" name="textfield" />
</label>
<p>
<label></label>
</p>
<p>
<label>
<input type="submit" name="Submit" value="Enviar" />
</label>
</p>
</form>
<?php }else{
$comen1=$_POST['textfield'];
if(isset($_POST['textfield'];))
{
$aux=$total*$comen1;
}
else
{
$aux=$total;
}
echo '<input type="text" name="total" value="'.$aux.'">';
}?>
</body>
</html>