Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> problemy z dodawniem danych
-Wieviór-
post
Post #1





Goście







[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...
Go to the top of the page
+Quote Post

Posty w temacie
- Wieviór   problemy z dodawniem danych   20.01.2004, 23:35:24
- - spenalzo   Rozwiązanie: usuń atrybut UNIQUE ze wszystkich pól...   21.01.2004, 00:06:01


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.12.2025 - 00:15