Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> pole input + automatyczne wyciagniecie danych
Lonas
post
Post #1





Grupa: Zarejestrowani
Postów: 576
Pomógł: 14
Dołączył: 9.11.2005

Ostrzeżenie: (20%)
X----


Hej - pytanko moje jest takie :

mam inputa - po wpisaniu do niego liczby 10 cyfrowej ( charakteruzyje produkt ) , jest ona wyszukiwana w bazie i pokazuje mi sie np jej zapas

Próbowałem tak ale coś mi nie działa, może ktoś będzie wiedział w czym rzecz ? smile.gif

  1. if(isset($_POST["hid"]) && !empty($_POST["hid"]) && $_POST["hid"]!="--") {
  2. $res = mysql_query("select * from top100_sklep where ref='".$_POST["s"]."'");
  3. $dane = mysql_fetch_row($res);
  4. } else {
  5. $dane = array_fill(0,13," ");
  6. }
  7. ?>
  8.  
  9.  
  10. <input id="s" name="s" onChange="document.getElementById('hid').value='submit';this.form.submit()">
  11.  
  12.  
  13.  
  14.  
  15. <input id="hid" name="hid" type="hidden" value="<?$_POST["s"]?>" />
  16.  
  17. <?php echo $dane[3]; ?>


--------------------
Go to the top of the page
+Quote Post

Posty w temacie


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: 20.08.2025 - 05:29