Advertisement
Guest User

Untitled

a guest
Jan 28th, 2017
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <?php
  2. session_start();
  3. require_once("dbconnect.php");
  4. if ($_POST['email'] != "" && $_POST['password'] != '') {
  5. $username = $_POST['email'];
  6. $password = $_POST['password'];
  7. $query = "SELECT * FROM `users` WHERE `Mail` = '".$username."'";
  8. $result = mysql_query($query);
  9. $row=mysql_fetch_array($result);
  10. if ($password !=$row['Password']) {
  11. echo "Datele introduse sunt incorecte<br>
  12. Click <a href='../index.php'>aici</a> pentru a reveni la pagina de login";
  13. } else {
  14. $_SESSION['Mail'] = $username;
  15. echo "Autentificarea a fost efectuata cu succes.";
  16.  
  17. header("location:../index.php");
  18. }
  19. }
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement