Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/06/2010, 09:46
martinro
 
Fecha de Ingreso: mayo-2010
Mensajes: 24
Antigüedad: 14 años
Puntos: 0
Duda para resolver este php

Hola aqui molestando nuevamente tengo problemas, es el siguiente:

<html>
<head>
<title>SUELO</title>
<link rel="stylesheet" href="cri.css" type="text/css" media="all">
</head>
<body>
<form action="suelod.php" method="post">
<div id="encabezado1"><img src="http://www.inia.cl/medios/banners/rayentue/LogoCFCTransparente.jpg" width="145" height="100"align="right">
<th scope="col"><img src="http://www.inia.cl/medios/inia_nuevoheader.jpg" width="688" height="100" align="center">
<img src="" width="145" height="100" align="left">
</div>
<div id="barrac"><center>
<ul>
<a href="portada.php">HOME</a><li><a href="datopredio.php">DATOS DEL PREDIO</a></li><a href="suelod.php"><li>SUELO</a></li><a href="sistema.php"><li>SISTEMA DE RIEGO</li><a href="planta.php"><li>PLANTA</li></a><li>CLIMA</li><li>DISPONIBILIDAD DE AGUA</li>
</ul>
</div>
<div id="lateral">
</div>
<div id="lateral2">
</div>
<table align="center">
<h1><p style="font-size=12pt">CALCULADOR SUELO</p></h1>
</table>
<table align="center">
<tr>
<td>
<p>
<?php;
if(isset($_POST['Enviar']{
echo "Bienvenido al calculador de riego del INIA Sr(a) $_POST[nombre] "};
?>
</p>
</td>
</tr>
<tr>
<td>Deseas ocupar nuestra base de datos? <a href="basesuelo.php"><input type="submit" value="Si" name="Si"></a>
<input type="submit" value="No" name="No">
</td>
</tr>
</table>
<table border="1" align="center"width="450px" >
<td rowspan="6"><h3>HUMEDAD APROVECHABLE <a href="index.php">¿?</a></h3>
</td>
<tr>
<td>
CC g/g</td>
<td><input type=text size=5 name="cc"></td>
</tr>
<tr>
<td>
PMP g/g</td>
 <td><input type=text size=5 name="pmp"></td>
</tr>
<tr>
<td>DAP g/cm3</td>
<td><input type=text size=5 name="dap"></td>
</tr>
<tr>
<td>Profundidad cm</td>
<td><input type=text size=5 name="profundidad"></td>
</tr>
<tr>
<td>Pedregosidad %</td>
<td><input type=text size=5 name="pedregosidad"></td>
</tr>
</table>
<tr><td><center><input type="submit" value="Calcular"></center></td></tr>
<table align ="center">


<?php


$varcc = $_POST['cc'];
$varpmp = $_POST['pmp'];
$vardap = $_POST['dap'];
$varpro = $_POST['profundidad'];
$varpe = $_POST['pedregosidad'];

$suma=$varcc-$varpmp;
$multiplicacion=$suma*$vardap;
$multiplicacion1=$multiplicacion*$varpro;
$multiplicacion2=((1-$varpe)*$multiplicacion1)*10;

echo "<h3>HA mm=<input type=text value=$multiplicacion2 ></input>";
?>
</table>
<table border="1" align="center"width="450px">
<td rowspan="3"><h3> HUMEDAD FACILMENTE APROVECHABLE <a href="HFA.php">¿?</a></h3>
</td>
<tr>
<td>
HA mm
</td>
<td>
<?php echo "<input type=text size=5 value=$multiplicacion2></input>";
?>
</td>
</tr>
<tr>
<td>
UR
</td>
<td>
<input type="text" size="5" name="UR" id="UR">
</td>
</tr>
</table>
<tr><td><center><input type="submit" value="Calcular"></center></td></tr></p>
<table>
<?php

$varur=0;
$varur = $_POST['UR'];

$multiplicacion3=(1-$varur)*$multiplicacion2;

echo " <CENTER> <h3>HFA = <input type=text value=$multiplicacion3></input></h3></CENTER>";


?>
</table>
<table>
<a href="sistema.php"><input type="submit" value="Seguir calculando"></a>
</table>
</form>
</body>
</html>

Para resumir mi problema va en que no reconoce la variable $multiplicacion2 en la operacion $multiplicacion 3 por lo que me aparece un 0 tratar de calcular el valor, no se el por que de este error, gracias de antemano