martedì 13 settembre 2011

Ordinamento di tre numeri

ORDINAMENTO DI TRE NUMERI HTML
<html>
<head>
<title>Ordinamento di tre numeri</title>
</head>
<body>
<h1><center>Ordinamento di 3 numeri</center></h1>
<p>
<form action="ordine_3.php" method="POST">
1<sup>o</sup> numero: <input type="text" name="prinum"><br>
2<sup>o</sup> numero: <input name="secnum"><br>
3<sup>o</sup> numero: <input name="ternum"><p>
<input type="submit" value="Invia">
<input type="reset" value="Cancella">
</form>
</body>
</html>


ORDINAMENTO DI TRE NUMERI PHP
<html>
<head>
<title>Ordinamento di tre numeri</title>
</head>
<body>
<h1><center>Ordinamento di 3 numeri</center></h1>
<p>
<?php
//Inizzializzazione delle variabili
$prinum=$_POST['prinum']; $secnum=$_POST['secnum']; $ternum=$_POST['ternum'];
echo "$prinum - $secnum - $ternum";
?>
</body>
</html>