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>
- <?php
- $id = $_GET["ID"];
- $servername = "localhost";
- $username = "root";
- $password = "";
- $database = "Korisnici";
- $conn = mysqli_connect($servername, $username, $password, $database);
- if(!$conn)
- {
- die("Greška prilikom spajanja<br>: " . mysqli_connect_error());
- }
- $sql = "SELECT * FROM Korisnici WHERE ID='$ID'";
- $result = $conn->query($sql);
- $ime="";
- $prezime="";
- $user="";
- $adresa="";
- $email="";
- $pass="";
- $akcija="";
- while($row = $result->fetch_assoc())
- {
- $ime=$row["Ime"];
- $prezime=$row["Prezime"];
- $user=$row["User"];
- $adresa=$row["Adresa"];
- $email=$row["Email"];
- $pass=$row["Password"];
- }
- ?>
- <form name="forma" action="insert.php" method="get">
- <input type="text" name="id" value=<?php echo "$ID";?>" />
- <input type="text" name="ime" value=<?php echo "$ime";?>" />
- <input type="text" name="prezime" value=<?php echo "$prezime";?>" />
- <input type="text" name="username" value=<?php echo "$user";?>" />
- <input type="text" name="adresa" value=<?php echo "$adresa";?>" />
- <input type="text" name="email" value=<?php echo "$email";?>" />
- <input type="text" name="pass" value=<?php echo "$pass";?>" />
- <input type="submit" value="Update">
- </form>
- </center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement