Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [MySQL][PHP]Problem z formularzem
krzesik
post
Post #1





Grupa: Zarejestrowani
Postów: 516
Pomógł: 1
Dołączył: 25.08.2012

Ostrzeżenie: (0%)
-----


Witam, mam na stronie skrypt w którym jest formularz. Częśc tego forma to autocomplete

  1. ...............
  2. <script type="text/javascript">
  3. $(function() {
  4. $( "#imie_nazwisko1" ).autocomplete(
  5. {
  6. source: "dane.php",
  7. minLength: 1
  8. });
  9. });
  10.  
  11. </script>
  12. <script type="text/javascript">
  13. function submit()
  14. {
  15. document.fakturaautomat.submit();
  16. }
  17. </script>
  18. </head>
  19. ...............
  20.  
  21. <form action="" method="post" name="fakturaautomat">
  22. ...............
  23.  
  24. <input type="text" id="imie_nazwisko1" onblur="submit();" class="form-control" placeholder="Nazwisko i Imię" name="imie_nazwisko" title="Nazwisko i Imię myśliwego" value="<?php if (!empty($_POST['imie_nazwisko'])) echo $_POST['imie_nazwisko']; else echo $_SESSION['login'];?>"
  25. onblur="if(this.value=='') this.value='<?php if (!empty($_POST['imie_nazwisko'])) echo $_POST['imie_nazwisko']; else echo $_SESSION['login'];?>';" onfocus="if(this.value=='<?php if (!empty($_POST['imie_nazwisko'])) echo $_POST['imie_nazwisko']; else echo $_SESSION['login'];?>') this.value='';" />
  26. ..................

w dalszej cześci mam tabelkę która wypełnia się z wcześniejszego skryptu
  1. <table width="100%" border="1" align="center">
  2. <tr>
  3. <td align="center" width="10%"><strong>L.p</strong></td>
  4. <td align="center" width="45%"><strong>Nazwa towaru / usługi</strong></td>
  5. <td align="center" width="10%"><strong>j.m.</strong></td>
  6. <td align="center" width="10%"><strong>Waga [kg]</strong></td>
  7. <td align="center" width="15%"><strong>Cena jedn. []</strong></td>
  8. <td align="center" width="10%"><strong>VAT</strong></td>
  9. </tr>
  10. $lp = 0;
  11.  
  12. foreach ( $identyfikator as $book )
  13. {
  14. $lp++;
  15. $book = explode(" | ",$book);
  16. ................

Tabelka jest wypełniona danymi, jednak gdy zmienię w inpucie imie_nazwisko wysyła się autocomplete submitem, wypełniając inne pola danymi, a tabelka po przeładowaniu strony robi się pusta. Prosze o pomoc
Go to the top of the page
+Quote Post

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

 



RSS Aktualny czas: 19.08.2025 - 15:31