Buongiorno a tutti,
ho un problema con un passaggio di paramtri da uno script php all'altro.
in uno sript che per comodità chiamerò A reperisco un valore da MySql che incremento e poi visualizzo a video (sempre nello stesso script); a questo punto, terminata la parte PHP, utilizzo il button chiamato "Avanti" per chiamare lo script B a cui devo passare il valore ottenuto precedentemente. B va regolarmente in esecuzione, ma senza il parametro valorizzato
qui sotto i 2 codici:
Grazie a chi mi aiuterà, perchè sto impazzendo
----------------------------------------------------------------------
Inizio di A
----------------------------------------------------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it" dir="ltr">
<head>
<title>Attribuzione Numero Offerta</title>
</head>
<body>
<table align="left" height="100%" width="100%" border="0" cellspacing="2" cellpadding="2" >
<tr align = "center">
<td colspan="2" align ="center" bgcolor="Aqua"><h1>Gestione Offerte</h1>
</tr>
</table>
<table>
<form method="POST" action="http://localhost/Preventivazione/inse1_offe.php?nroffe=$nroffe">
<?php
include ("config.inc.php");
$db = mysql_connect($host, $user, $password)
or die("impossibile connettersi al server host");
mysql_select_db($database, $db)
or die ("impossibile connettersi al database $database");
$query = "select * from numoffe";
$dbResult = mysql_query($query, $db);
$row=mysql_fetch_row($dbResult);
$nroffe = $row[2];
$nroffe = $nroffe + 1;
print("<td><h3>Si inserisce l'Offerta numero: $nroffe</h3></td>");
print ("<tr></tr>");
echo "Offerta = $nroffe
";
print ("<tr><td><input type = hidden name = $nroffe </tr></td>");
print ("<tr>");
print ("<td> <input type =submit value = Continua> </td>");
print ("</tr>");
?>
<tr><td><input type="hidden" name="nroffe" value= $nroffe size = "11 maxlenght = "11"></td></tr>
</table>
<table>
<tr>
<td>
echo "Offerta = $nroffe
";
<input type="submit" value=" Continua ">
</form></td>
<td>
<form action="http://localhost/Preventivazione/gesoff01.html">
<input type="submit" value=" Indietro "></form></td>
<td align="left">
<form action="http://localhost/Preventivazione/Login.html">
<input type="submit" value=" Logoff ">
</form></td>
</tr>
</table>
</body>
</html>
----------------------------------------------------------------------
INIZIO DI B
----------------------------------------------------------------------
<html>
<head>
<title>Modifica Numero di Offerta</title>
</head>
<body>
<?php
//session_start();
include ("config.inc.php");
$nroffe = htmlentities($_REQUEST['nroffe']);
echo "Valore = $nroffe
";
if (isset($_REQUEST['nroffe'])){
echo ("Valore=$_REQUEST[$nroffe]
");
}
else {
echo 'Nessun valore passato
';
};
?>
</body>
</html>