Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'baza.php';
- db_connect();
- ?>
- <html>
- <form action="" method="post" >
- <input type="text" name="email1">
- <input type="password" name="pass1">
- <input type="submit" name="putac">
- </form>
- <body>
- <table border=1>
- <tr><th>Email</th><th>Ime</th><th>Prezime</th><th>Lozinka</th></tr>
- <?php
- $myemail = $_POST["email1"];
- $mypass = $_POST["pass1"];
- $result = db_query("SELECT * FROM korisnik WHERE email='$myemail' AND lozinka='$mypass'");
- if ($result == false)
- {
- die("Error: "); // Handle failure - log the error, notify administrator, etc.
- }
- while ($row = mysqli_fetch_assoc($result))
- {
- echo "<tr>";
- echo "<td>{$row['email']}</td>";
- echo "<td>{$row['ime']}</td>";
- echo "<td>{$row['prezime']}</td>";
- echo "<td>{$row['lozinka']}</td>";
- echo "</tr>";
- }
- ?>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement