Form Sayfası giris.php
Giriş Yap - Online Akademisyen Destek Sistemi
<script></script>
<script></script>
Online Akademisyen Destek Sistemi
akademisyenler için oluşturulmuş medya depolama, paylaşma ve yardımlaşma platformu.
OADS'ye GİRİŞ YAP
Üye bilgilerinizi girin
<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
login.js
$(document).ready(function(){
$("#login").click(function(){
var email = $("#email").val();
var password = $("#password").val();
var url = "login.php";
// Checking for blank fields.
if( email =='' || password ==''){
$('input[type="text"],input[type="password"]').css("border","2px solid red");
$('input[type="text"],input[type="password"]').css("box-shadow","0 0 3px red");
alert("Lütfen üyelik bilgilerinizi girin");
}else {
var gidecek= {email1:email,password1:password};
var aaa = $.post(url , gidecek);
aaa.done(function(data) {
if(data=='Invalid Email.......') {
$('input[type="text"]').css({"border":"2px solid red","box-shadow":"0 0 3px red"});
$('input[type="password"]').css({"border":"2px solid #00F5FF","box-shadow":"0 0 5px #00F5FF"});
alert(data);
}else if(data=='Email or Password is wrong...!!!!'){
$('input[type="text"],input[type="password"]').css({"border":"2px solid red","box-shadow":"0 0 3px red"});
alert(data);
} else if(data=='Successfully Logged in...'){
$("form")[0].reset();
$('input[type="text"],input[type="password"]').css({"border":"2px solid #00F5FF","box-shadow":"0 0 5px #00F5FF"});
alert(data);
} else{
alert(data);
}
})
}
});
});
Hata veren sayfa login.php
include("config/connect.php");
$email = $_POST['email1']; // Fetching Values from URL.$_POST['email1']
$password = sha1($_POST['password1']); // Password Encryption, If you like you can also leave sha1.sha1($_POST['password1'])
// check if e-mail address syntax is valid or not
$email = filter_var($email, FILTER_SANITIZE_EMAIL); // sanitizing email(Remove unexpected symbol like <,>,?,#,!, etc.)
if (!filter_var($email, FILTER_VALIDATE_EMAIL)){
echo "Invalid Email.......";
}else{
// Matching user input email and password with stored email and password in database.
$veri = $db->query("SELECT * FROM users WHERE email='$email' AND password='$password'")->fetch(PDO::FETCH_ASSOC);
if ($veri!=NULL) {
echo "Successfully Logged in...";
}else{
echo "Email or Password is wrong...!!!!";
}
}
?>