Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $mysqli = new mysqli("localhost", "root", "Admirih123", "mreza");
- $mail = $_GET["mail"];
- $sqlprovjera = "select * from Korisnik where E_mail='$mail'";
- if($result = $mysqli->query($sqlprovjera))
- {
- $row_cnt = $result->num_rows;
- if($row_cnt==1)
- {
- echo("Korisnik je registrovan vec");
- $result->close();
- }
- else
- {
- $sql = "INSERT INTO Korisnik VALUES('".$_GET['mail']."','".$_GET['ime']."','".$_GET['prezime']."')";
- $mysqli->query($sql);
- echo("Korisnik je uspjesno registrovan.");
- }
- }
- $mysqli->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement