Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- require_once("dbconnect.php");
- if ($_POST['email'] != "" && $_POST['password'] != '') {
- $username = $_POST['email'];
- $password = $_POST['password'];
- $query = "SELECT * FROM `users` WHERE `Mail` = '".$username."'";
- $result = mysql_query($query);
- $row=mysql_fetch_array($result);
- if ($password !=$row['Password']) {
- echo "Datele introduse sunt incorecte<br>
- Click <a href='../index.php'>aici</a> pentru a reveni la pagina de login";
- } else {
- $_SESSION['Mail'] = $username;
- echo "Autentificarea a fost efectuata cu succes.";
- header("location:../index.php");
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement