| -Wieviór- |
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... |
|
|
|
![]() |
Post
#2
|
|
|
Grupa: Zarejestrowani Postów: 2 064 Pomógł: 1 Dołączył: 22.01.2003 Skąd: Poznań Ostrzeżenie: (0%)
|
Rozwiązanie: usuń atrybut UNIQUE ze wszystkich pól.
|
|
|
|
![]() ![]() |
|
Aktualny czas: 21.12.2025 - 18:26 |