SHARE
TWEET

Untitled

a guest May 22nd, 2017 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. <?php
  3.                           $prijmeni = $_POST["prijmeni"];
  4.                           $jmeno = $_POST["jmeno"];
  5.                           $ulice = $_POST["ulice"];
  6.                           $mesto  = $_POST["mesto"];
  7.                           $telefon = $_POST["telefon"];
  8.                           $psc = $_POST["psc"];
  9.                           $rodcislo = $_POST["rodcislo"];
  10.                           $ID_Zakaznik = $_POST["idzakaznik"];
  11.                      
  12.                        
  13.                
  14. $servername = "localhost";
  15. $username = "xxx";
  16. $password = "xxx";
  17. $dbname = "xxx";
  18.  
  19. // Create connection
  20. $conn = mysqli_connect($servername, $username, $password, $dbname);
  21. // Check connection
  22. if (!$conn) {
  23.     die("Connection failed: " . mysqli_connect_error());
  24. }
  25.  
  26. $sql = "UPDATE Zakaznik SET ID_Zakaznik='.$ID_Zakaznik.', Prijmeni='.$prijmeni.', Jmeno='.$jmeno.', Ulice='.$ulice.', Mesto='.$mesto.', Telefon='.$telefon.', PSC='.$psc.', RodneCislo='.$rodcislo.' WHERE ID_Zakaznik='.$ID_Zakaznik.'";
  27.  
  28. if (mysqli_query($conn, $sql)) {
  29.     echo "Z├íznam byl upraven";
  30. } else {
  31.     echo "Error:" . mysqli_error($conn);
  32. }
  33.  
  34. mysqli_close($conn);
  35.  
  36. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top