hi,
i want to write to an table some information from a form but keep getting an SQL error to check the syntax.
I really can'y figure it out.
can someone help?
echo "<table width='450'><tr><td width='150'>Utilitate</td><td width='150'>Pret ( Separatorul zecimal este -punct-)</td><td width='150'>Data aplicarii (In forma AAAA-LL-ZZ)</td></tr></table>";
echo "<form method='post'>";
echo " <table width='450'>
<tr>
<td width='150'> Apa Rece:</td>
<td width='150'><input type='text' name='pret' align='center' size='10' maxlength='5'></td>";
$pret=$_POST['pret'];
echo" <td width='150'> <input type='text' name='data' align='center' size='12' maxlength='10'> </td>
</tr> </table>
<input type='submit' value='Modifica'>";
$data=$_POST['data'];
echo "</form>";
$insert= "INSERT INTO pret_apa_rece(pret, data) VALUES (".$pret.",".$data. ")";
if (!mysql_query($insert,$con)){
die('Error: ' . mysql_error());
}
echo "<br>Inregistrare adaugata!";
break;