Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript][MySQL][PHP]Dynamiczne odczytanie i zapisanie danej do MySQL
globalinfo
post
Post #1





Grupa: Zarejestrowani
Postów: 55
Pomógł: 0
Dołączył: 8.10.2006

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


Witam,

Chciałbym odczytać dane z MySQL dla zmiennej
var count1 = 6;
Potem po zmianie wartości przez kliknięcie przycisku automatycznie uaktualnić wartość w bazie - nie bardzo wiem jak to ugryźć. (IMG:style_emoticons/default/sciana.gif)

Kod
<script type="text/javascript">
        var count1 = 6;
        function GON1() { if( count1 <= 24){var el = document.getElementById('GON1'); el.innerHTML = count1++
  
        }}
         function GON12(){if( count1 >= 0){var el = document.getElementById('GON1'); el.innerHTML = count1--}}
</script>
  

<div style='position:absolute;margin: 30px 0 0 115px'>
<a href="#" onClick="GON1()"><div class='buttonUp'></div></a></div>

<div style='position:absolute;margin: 45px 0 0 120px'>
<h2> <p id="GON1"><? echo $count1; ?></p> </h2></div>

<div style='position:absolute;margin: 105px 0 0 115px'>
<a href="#" onClick="GON12()"><div class='buttonDown'></div></a></div>


Ten post edytował globalinfo 7.03.2017, 20:42:03
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nospor
post
Post #2





Grupa: Moderatorzy
Postów: 36 559
Pomógł: 6315
Dołączył: 27.12.2004




a jQuery dodales? Bo wg. komunikatu nie.
Go to the top of the page
+Quote Post
globalinfo
post
Post #3





Grupa: Zarejestrowani
Postów: 55
Pomógł: 0
Dołączył: 8.10.2006

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


Cytat(nospor @ 8.03.2017, 19:20:28 ) *
a jQuery dodales? Bo wg. komunikatu nie.

Wielkie dzięki
DZIAŁA SUPER (IMG:style_emoticons/default/thumbsupsmileyanim.gif) (IMG:style_emoticons/default/yahoo.gif)
Go to the top of the page
+Quote Post

Posty w temacie


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: 9.10.2025 - 17:48