allora le pagine in questione sono 3 che per facilità chiamerò 1.php ,2.php e 3.php.
in 1.php
Codice PHP:
include("./stile.php");
echo('<SCRIPT LANGUAGE="JAVASCRIPT">' . "\n");
echo('function aggiungielemento(iNElem,sElem)' . "\n");
echo('{' . "\n");
echo(' if(document.forms[0].elements[iNElem].checked == true)' . "\n");
echo(' {' . "\n");
echo(' if(forniscielementi.sBuffer.value.indexOf(sElem) == -1)' . "\n");
echo(' {' . "\n");
echo(' forniscielementi.sBuffer.value = forniscielementi.sBuffer.value + sElem + \',\';' . "\n");
echo(' }' . "\n");
echo(' }' . "\n");
echo(' else' . "\n");
echo(' {' . "\n");
echo(' sElem = sElem + \',\';' . "\n");
echo(' forniscielementi.sBuffer.value = forniscielementi.sBuffer.value.replace(sElem , "");' . "\n");
echo(' }' . "\n");
echo(' recordsuccessivi.sBuffer.value = forniscielementi.sBuffer.value;' . "\n");
echo(' recordprecedenti.sBuffer.value = forniscielementi.sBuffer.value;' . "\n");
echo('}' . "\n");
echo('</SCRIPT>' . "\n");
echo('</HEAD>' . "\n");
echo('<BODY class="sfondo">' . "\n");
echo('<form name="forniscielementi" action = "2.php" method="post">' . "\n");
....segue codice....
in 2.php
Codice PHP:
include("./stile.php");
?>
<script language = "javascript">
function valorizza()
{
<?php
echo(' forniscielementi.sBuffer.value = "' . $sBuffer . '"' . "\n");
echo(' forniscielementi.sBufferMant.value = "' . $sBufferMant . '"' . "\n");
echo(' forniscielementi.mese.value = "' . $mese . '"' . "\n");
echo(' forniscielementi.conc.value = "' . $conc . '"' . "\n");
echo(' forniscielementi.tipo.value = "' . $tipo . '"' . "\n");
echo(' forniscielementi.pacco.value = "' . $pacco . '"' . "\n");
echo(' forniscielementi.busta.value = "' . $busta . '"' . "\n");
echo(' forniscielementi.file.value = "' . $file . '"' . "\n");
?>
forniscielementi.submit();
}
</script>
</head>
<body class="sfondo" onload="valorizza()">
<form name="forniscielementi" method="POST" action = "3.php" target="newWin"\n>
<input type="hidden" name = "sBuffer">
<input type="hidden" name = "sBufferMant">
<input type="hidden" name = "mese">
<input type="hidden" name = "conc">
<input type="hidden" name = "tipo">
<input type="hidden" name = "pacco">
<input type="hidden" name = "busta">
<input type="hidden" name = "file">
</form>
</body>