| -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... |
|
|
|
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 ![]() ![]() |
|
Aktualny czas: 24.12.2025 - 00:15 |