View Single Post
Old 01-05-2007, 20:15   #6
cagnaluia
Senior Member
 
L'Avatar di cagnaluia
 
Iscritto dal: Oct 2003
Città: TV
Messaggi: 10831
ok fatto..

due pagine.

index.html
Codice:
<html>
	<head>
		<title></title>
	</head>
	<body>
 <FORM action="funzione.php" method="post">
    <P>
    <LABEL>Nome: </LABEL><INPUT type="text" name="nome"><BR>
    <LABEL>Cognome: </LABEL><INPUT type="text" name="cognome"><BR>
    <LABEL>Email: </LABEL><INPUT type="text" name="email"><BR>
    <LABEL>Telefono: </LABEL><INPUT type="text" name="telefono"><BR>
    <LABEL>Fax: </LABEL><INPUT type="text" name="fax"><BR>
    <INPUT type="submit" value="Invia"> <INPUT type="reset">
    </P>
 </FORM>
	</body>
</html>

e funzione.php
Codice:
<html>
	<head>
	</head>
	<body>
		<?php 
			$i=1;
			$vettore = array($_POST['nome'], $_POST['cognome'], $_POST['email'], $_POST['telefono'], $_POST['fax']);
			foreach($vettore as $stringa) 
			{
       			echo "Campo ".$i.": ".$stringa."<br>";
       			$i++;
			}
		?>
	</body>
</html>

tutto perfetto.

solo una cosa.. perchè scrivo "foreach($vettore as $stringa)" ?
__________________
cagnaluia
MTB|DH|Running|Diving
Eos1DX|16-35f4Lis|35f1.4L|100f2|300F4LIS
cagnaluia è offline   Rispondi citando il messaggio o parte di esso