Grazie per la risposta sei molto gentile ma non devo aprire un grosso negozio devo solamente vendere un prodotto, ti posto il codice della pagina che sto utilizzando.
Vorrei che il risultato dello script che genera un "codice univoco" venga stampato dentro il campo di testo "ordine".
<html>
<head>
<title>Pagina Pagamento</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div align="center">
<form action="buy.php" method="post" name="pagamento" id="pagamento">
<table width="85%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td></td>
<td><font color="#0066CC">
<?php
function randomPassword () {
$length ="8"; // the length of the password required
$possible = '23456789' .
'abcdefghijkmnpqrstuvwxyz' .
'ABCDEFGHJKLMNPQRSTUVWXYZ';
$str ="";
while (strlen($str) < $length) {
$str.=substr($possible, (rand() % strlen($possible)),1);
}
return($str);
}
echo("".randomPassword()."");
?>
</font></td>
<td></td>
</tr>
<tr>
<td width="17%">Ordine n°:</td>
<td width="75%"><font color="#0066CC">
<input name="ordine" type="text" class="form3" id="ordine" style="vertical-align:middle ">
</font></td>
<td width="8%"></td>
</tr>
<tr>
<td>Importo:</td>
<td> <div align="left">
<select name="importo" class="form3" id="importo">
<option value="10.00">1 Pezzi 10 €</option>
<option value="17,00">2 Pezzi 17 €</option>
</select>
</div></td>
<td></td>
</tr>
<tr>
<td></td>
<td><div align="right">
<input name="Submit222" type="submit" class="form2" value="acquista">
</div></td>
<td><div align="right"> </div></td>
</tr>
<tr>
<td colspan="2"> <font color="#0066CC"> </font></td>
<td></td>
</tr>
<tr>
<td colspan="3"><div align="left"></div></td>
</tr>
</table>
</form>
</div>
</body>
</html>