io ho il seguente form di invio:
e lo ricevo con questa script:codice:$risultato =mysql_query("SELECT Titolo,Db FROM lavorazioni") or die("Query non valida".mysql_error()); ?> <form name="select_db_lavorazioni" action="./scelta.php" method="POST"> <table border="0" width="100%" align="center"> <? while ($riga = mysql_fetch_object($risultato)) { ?><tr><td align="left"><input type="radio" name="db" value="<? $riga->Db;?>"></td><td><? echo $riga->Titolo;?></td></tr><? } ?> <td align="center" colspan="4"> <input type="submit" value="invia"><input type="reset" value="reset"></td></tr> </table>
ma il server mi restituisce un errore mysql:codice:$risultato =mysql_query("SELECT Titolo,Db FROM ".$_POST['db']."") or die("Query non valida".mysql_error()); ?> <form name="select_db_lavorazioni" action="./aggiungi.php" method="POST"> <table border="0" width="100%" align="center"> <? while ($riga = mysql_fetch_object($risultato)) { ?><tr><td align="left"><input type="radio" name="db" value="<? $riga->Db;?>"></td><td><? echo $riga->Titolo;?></td></tr><? } ?> <td align="center" colspan="4"> <input type="submit" value="invia"><input type="reset" value="reset"></td></tr> </table>
Query non validaYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
penso sia un problema di post... sembrerebbe che non mi passa il contenuto del form...
perke'?!?!? :master:

Rispondi quotando
