[php:1:7d65f8660f]
<form action="" method="POST">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><p>Gole gospodarzy:</td>
<td><p>Gole gości:</td>
</tr>
<tr>
<td><input name="hgol"></td>
<td><input name="agol"></td>
</tr>
</table>
<input type="submit" name="submit" value="Wyślij">
</form>
<?
if($_POST['submit']){
$sql= "INSERT INTO live (hgol, agol) VALUES ('".$_POST['hgol']."', '".$_POST['agol']."')";
mysql_query($sql) or die(mysql_error());
}
mysql_close($connect);
?>
[/php:1:7d65f8660f]
Taki błąd(mysql error): Duplicate entry '0' for key 1
Co mam zrobić? Mam w "live" pola: id(index), hgol, agol i jeszcze inne ale nie dotyczy...