Il codice :
Codice PHP:
<form action='' method='post'>
    <tr>
    <td>Tipo di richiesta</td>
    <td>:</td>
    <td><input type='radio' name='btn_submit' value='1' onclick='this.form.submit();'>Intervento Tecnico</input></td>
    <td><input type='radio' name='btn_submit' value='2' onclick='this.form.submit();'>Materiale di consumo</input></td>
    <td><input type='radio' name='btn_submit' value='3' onclick='this.form.submit();'>HW/SW aggiuntivo </input></td>
<?php    
if (isset($_POST['btn_submit'])) 
{
    
$btn_submit $_POST['btn_submit'];

}
$_SESSION['btn_submit'] = $btn_submit;
    
if (
$btn_submit=='1')
    {
        echo 
"<textarea name='comments' cols='105' rows='9'>richiesta intervento tecnico...</textarea><br>";
    }
if (
$btn_submit=='2')
    {
        
$RMC "SELECT marca,matricola FROM materiali";
        
mysql_query($RMC) or die (mysql_error());
        echo 
"<table  width='600px' align='center' border='1' bgcolor='#CCFFFF'>
                                <tr>
                                <th>Marca</th>
                                <th>Matricola</th>
                               </tr>"
;
                        while(
$row mysql_fetch_array($RMC))
                        {
                        echo 
"<tr>";
                        echo 
"<td>" $row['marca'] . "</td>";
                        echo 
"<td>" $row['matricola'] . "</td>";
                        }
    }            
    
if (
$btn_submit=='3')
    {    
        echo 
"<textarea name='comments' cols='105' rows='9'>richiesta HW/SW aggiuntivo...</textarea><br>";
    }
?>
</tr>
l'errore:
codice:
[Thu Jun 05 14:30:24 2014] [error] [client 127.0.0.1] PHP Warning:  mysql_fetch_array() expects parameter 1 to be resource, string given in /var/www/html/personale.php on line 98, referer: http://127.0.0.1/personale.php