Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- <?php
- $servername = "10.253.---.--";
- $username = "intranet";
- $password = "----";
- $dbname = "intranet";
- // Create connection
- $conn = mysqli_connect($servername, $username, $password, $dbname);
- // Check connection
- if (!$conn) {
- die("Connection failed: " . mysqli_connect_error());
- }
- $sql = "INSERT INTO AdresarGIS (Adresa, Broj, Mesto, Agent, Komentar)
- VALUES ('$_POST[Adresa]','$_POST[Broj]','$_POST[Mesto]','$_POST[Agent]','$_POST[Komentar]' )";
- if (mysqli_query($conn, $sql)) {
- echo "New record created successfully";
- } else {
- echo "Error: " . $sql . "<br>" . mysqli_error($conn);
- }
- mysqli_close($conn);
- ?>
- <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
- <p>
- <label for="Adresa">Adresa</label><br/>
- <input type="text" name="Adresa" />
- </p>
- <p>
- <label for="Broj">Broj</label><br/>
- <input type="text" name="Broj" />
- </p>
- <p>
- <label for="Mesto">Mesto</label><br/>
- <input type="text" name="Mesto" />
- </p>
- <p>
- <label for="Agent">Agent</label><br/>
- <input type="text" name="Agent" />
- </p>
- <p>
- <label for="Komentar">Komentar</label><br/>
- <input type="text" name="Komentar" />
- </p>
- <p>
- <input type="submit" name="submit" value="Pošalji" />
- </p>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement