Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset="utf-8">
- </head>
- <body>
- <center>
- <h1> I. tehnicka skola TESLA </h1><hr>
- <?php
- $id = $_GET["id"];
- $servername = "localhost";
- $username = "root";
- $password = "";
- $database = "korisnici";
- $conn = mysqli_connect($servername, $username, $password, $database);
- if (!$conn) {
- die("Connection failed: " . mysqli_connect_error());
- }
- $sql = "SELECT * FROM korisnici WHERE id='$id'";
- mysqli_query($conn, "SET NAMES 'utf8'");
- $result = $conn->query($sql);
- $name="";
- $username="";
- $lozinka="";
- $akcija="Update";
- while ($row = $result->fetch_assoc()) {
- $name = $row["Name"];
- $username = $row["Username"];
- $lozinka = $row["Pass"];
- }
- ?>
- <form name="forma" action="insert.php" method="get">
- <input type="text" name="id" value="<?php echo "$id";?>" /> <br>
- <input type="text" name="name" value="<?php echo "$name";?>" /> <br>
- <input type="text" name="username" value="<?php echo "$username";?>" /> <br>
- <input type="text" name="pass" value="<?php echo "$lozinka";?>" /> <br>
- <input type="submit" value="Update">
- </center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement