Jump to content

Nuimi

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Nuimi

  1. Can you help me with this update question.

      $db= new mysqli("localhost", "dany66", "*******", "mathstart");       $email_n = $_POST['email_n'];       $vek_n = $_POST['vek_n'];       $datum_n = $_POST['datum_n'];       if(isset($email_n))       {        $update1 = "UPDATE inf(email) SET  email= '$email'                     WHERE jmeno = '" . $_SESSION['username'] . "'";        $pokus = $db -> query($update1);        if(fetch_assoc($pokus) == TRUE)        {         echo("<script> alert('Řádek s e-mailem byl změněn.')</script>");        }        }
  2. Can you help me with sql, I need update form, but I don´t know how can I do it.

           $db= new mysqli("localhost", "dany66", "*******", "mathstart");       $email_n = $_POST['email_n'];       $vek_n = $_POST['vek_n'];       $datum_n = $_POST['datum_n'];       if(isset($email_n))       {        $update1 = "UPDATE inf(email) SET  email= '$email'                     WHERE jmeno = '" . $_SESSION['username'] . "'";        $pokus = $db -> query($update1);        if(fetch_assoc($pokus) == TRUE)        {         echo("<script> alert('Řádek s e-mailem byl změněn.')</script>");        }        }
  3. Can you help me with function zmen. I need change picture after click. (click one x.jpg, click two o.jpg, click three x.jpg, click four o.jpg, ...)

    <script type="text/javascript">     hodnoty = ['img/nic.png','img/x.jpg','img/o.jpg'];     hrac = 2;      hrac1 = hrac ? 1 : 2;         function zmen(img,hrac)     {       if(hrac < 1)      {         img.src = (img.src!=hodnoty[0]) ? hodnoty[hrac] : hodnoty[0];      }      else      {       img.src = (img.src!=hodnoty[0]) ? hodnoty[hrac1] : hodnoty[0];      }     }     function reset(img,hrac)     {      var im, ob, i;      ob = document.getElementById('pole');      im = ob.getElementsByTagName('img');       for(i=0;i<im.length;i++)      {       zmen(im[i],0);      }     }    </script>
×
×
  • Create New...