Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $ime = $_GET["Ime"];
- $prezime = $_GET["Prezime"];
- $adresa = $_GET["Adresa"];
- $email = $_GET["Email"];
- $user = $_GET["Korisnik"];
- $pass = $_GET["Pass"];
- $servername = "localhost";
- $username = "root";
- $password = "";
- $dbname = "Korisnici";
- $conn = new mysqli($servername, $username, $password, $dbname);
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- $sql = "INSERT INTO Korisnici (Ime, Prezime, Adresa, Email, Username, Pass)
- VALUES ('$ime', '$prezime', '$adresa', '$email', '$user', '$pass')";
- if ($conn->query($sql) === TRUE) {
- echo "New record created successfully";
- } else {
- echo "Error: " . $sql . "<br>" . $conn->error;
- }
- $conn->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement