Hello
with this script I need to show the user (utenti) list and after I need to
input in the table RICHIESTA the field COGNOME e NOME.
This is the code but don't go. Someone can tell me where is the mistake???
Many Thanks!!
<select name="user" id="user">
<?
$q= mysql_query("se lect * from utenti order by user");
while ($res=mysql_fet ch_array($q))
{
echo "<OPTION VALUE=\"$res[user]\">$res[user] --
$res[reparto]</OPTION>";
}
mysql_free_resu lt($q);
$rs = mysql_query("SE LECT * FROM utenti WHERE user = ".$user);
$cognome = mysql_result($r s, 0, "cognome");
$nome = mysql_result($r s, 0, "nome");
mysql_query("IN SERT INTO richiesta (cognome,nome) VALUES
($cognome,$nome )");
?>
</select>
with this script I need to show the user (utenti) list and after I need to
input in the table RICHIESTA the field COGNOME e NOME.
This is the code but don't go. Someone can tell me where is the mistake???
Many Thanks!!
<select name="user" id="user">
<?
$q= mysql_query("se lect * from utenti order by user");
while ($res=mysql_fet ch_array($q))
{
echo "<OPTION VALUE=\"$res[user]\">$res[user] --
$res[reparto]</OPTION>";
}
mysql_free_resu lt($q);
$rs = mysql_query("SE LECT * FROM utenti WHERE user = ".$user);
$cognome = mysql_result($r s, 0, "cognome");
$nome = mysql_result($r s, 0, "nome");
mysql_query("IN SERT INTO richiesta (cognome,nome) VALUES
($cognome,$nome )");
?>
</select>
Comment