Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/htmL; charset=utf-8"/>
- </head>
- <body>
- <center>
- <h1> I. tehnicka skola TESLA </h1> <br>
- <?php
- $id = $_GET["id"];
- $name = $_GET["korisnik"];
- $korisnik = $_GET["username"];
- $lozinka = $_GET["password"];
- $servername = "localhost";
- $username = "root";
- $password = "";
- $database = "users";
- $conn = mysqli_connect($servername, $username, $password, $database);
- if (!$conn) {
- die("Connection failed: " . mysqli_connect_error());
- }
- $sql = "UPDATE `korisnici` SET `Name`='$name',`Username`='$korisnik',`Password`='$lozinka' WHERE ID='$id'";
- mysqli_query($conn, "SET NAME 'utf8'");
- $result = $conn->query($sql);
- if ($result === TRUE) {
- echo "Record updated successfully";
- } else {
- echo "Error updating record: " . $conn->error;
- }
- $conn->close();
- ?>
- </center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement