Código PHP:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!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=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<center>
<b><u>
<font color="#000066" size="+2" face="Arial, Helvetica, sans-serif">
CAMBIO DE MONEDA
</font>
</u></b>
</center><br>
<FORM action="/scripts/ejemplos/1practicafinal.asp" method="POST">
<table width="543" height="58" border="0" align="center">
<tr>
<td width="267"><b>
<div align="rigth"><font color="#0000CC" size="-1" face="Arial, Helvetica, sans-serif">Moneda Origen</font> </div></b></td>
<td width="266"><b>
<div align="rigth"><font color="#0000CC" size="-1" face="Arial, Helvetica, sans-serif">Moneda Destino</font> </div></b></td>
</tr>
<tr>
<td>
<div align="rigth">
<select name="origen" size="1">
<option value="1" selected="selected"> EUROS </option>
<option value="2" > PESETAS </option>
<option value="3" > DOLARES </option>
</select></div></td>
<td>
<div align="rigth">
<select name="destino" size="1">
<option value="1" > EUROS </option>
<option value="2" selected="selected"> PESETAS </option>
<option value="3" > DOLARES </option>
</select>
</div></td>
</tr>
</table>
<table width="543" height="58" border="0" align="center">
<tr>
<td width="267"><b>
<div align="rigth"><font color="#0000CC" size="-1" face="Arial, Helvetica, sans-serif">INTRODUZCA CANTIDAD</font> </div></b></td>
<td width="266"><b>
<div align="rigth"><font color="#0000CC" size="-1" face="Arial, Helvetica, sans-serif">AL CAMBIO</font> </div></b></td>
</tr>
<tr>
<td>
<div align="rigth">
<input type="text" name="cantidad" size="20">esta cantidad seria enviada al archivo asp junto con las opciones de los selects
</div></td>
<td>
<div align="rigth">
<b>
<font color="#FF0000" size="-1" face="Arial, Helvetica, sans-serif">aqui saldria figurado el resultado de la conversion devuelto o importado del script asp despues de presionar el boton CONVERTIR
</font>
</b>
</div></td>
</tr>
</table>
<br><br><div align="center"><input type="submit" value="CONVERTIR"></div>
</FORM>
<table width="543" height="58" border="0" align="center">
<tr>
<td width="266" align="center"><b>Resultado de la Conversion
<div align="center"><font color="#000000" size="-1" face="Arial, Helvetica, sans-serif">
<%
if request.ServerVariables("REQUEST_METHOD")="POST" then
origen = request.Form("origen")
destino = request.Form("destino")
cantidad = request.Form("cantidad")
response.Write "<br />"
select case origen
case 1 respuesta1 = "Tus " & cantidad & " Euros equivalen a "
case 2 respuesta1 = "Tus " & cantidad & " Pesetas equivalen a "
case 3 respuesta1 = "Tus " & cantidad & " Dolares equivalen a "
end select
if origen=1 and destino=2 then
total=cdbl(cantidad)*166.39
else
if origen=1 and destino=3 then
total=cdbl(cantidad)*1.25
else
if origen=2 and destino=1 then
total=cdbl(cantidad)*0.006
else
if origen=2 and destino=3 then
total=cdbl(cantidad)*0.008
else
if origen=3 and destino=1 then
total=cdbl(cantidad)*0.08
else
if origen=3 and destino=2 then
total=cdbl(cantidad)*133.11
end if
end if
end if
end if
end if
end if
select case destino
case 1 respuesta2 = total & " Euros"
case 2 respuesta2 = total & " Pesetas"
case 3 respuesta2 = total & " Dolares"
end select
response.Write respuesta1 & respuesta2
end if
%></font> </div></b></td>
</tr>
</table>
<table width="251" height="58" border="0" align="center">
<tr>
<td width="266"><b>
<div align="center"><font color="#FF0000" size="-1" face="Arial, Helvetica, sans-serif">Muestra cuanto equivale 1 moneda a otra moneda segun tipo conversion que se ha realizado ejemplo 1 euro equivale a tantos dolares en el caso que se haya hecho una conversion de euros a dolares (aqui tambien se mostraria el resultado de otro script asp)</font> </div></b></td>
</tr>
</table>
<br><br><b><div align="center"><font color="#FF0000" size="-1" face="Arial, Helvetica, sans-serif">mostrar fecha llamando a un script asp</font></div></b>
</body>
</html>