Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/05/2004, 13:47
forero
 
Fecha de Ingreso: noviembre-2003
Mensajes: 18
Antigüedad: 20 años, 5 meses
Puntos: 0
Duda con formularios

a ver tengo 2 archivos:
el primero:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form action="conversor2.php" method="post">
Valor a calcular <input type="text" name="valor"><br>
Opciones: <input type="radio" name="seleccion" value="1"> Pasar a pesetas
<input type="radio" name="seleccion" value="2"> Pasar a Euros <br>
<input name="convertir" type="submit" id="convertir" value="Pedir conversion">
</form>

</body>
</html>

el segundo:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Conversor</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?php
if($_POST["seleccion"]==1){echo "su valor en Euros es: ". $_POST["valor"] / 166.386}
if($_POST["seleccion"]==2){echo "su valor en Euros es: ". $_POST["valor"] * 166.386}
?>
</body>
</html>

pues bien... no debo llamar bien al valor seleccion, no sale nada...donde me vuelvo a equivocar????