Location: PHPKode > projects > MythPHP > MythPHPv1.0/www/giriskontrol.php
<?php
session_start();

include 'ayar.php';

$mail = $_POST['mail'];
$pass1 = $_POST['passw'];
$pass = base64_encode($pass1);

$sansurle = array('CREATE','DELETE','SELECT','FROM','LIMIT','TABLE','MYISAM','*','ORDER','ASC','JOIN','BINARY','WHERE','<','>');
$editle = array('---','---','---','---','---','---','---','---','---','---','---','---','---','---','---');
$mail2 = str_replace($sansurle,$editle,$mail);

$securemail = mysql_real_escape_string($mail2);

if(empty($securemail)){ Header("Location:giris2.html"); }

$sansurle2 = array('CREATE','DELETE','SELECT','FROM','LIMIT','TABLE','MYISAM','*','ORDER','ASC','JOIN','BINARY','WHERE','<','>');
$editle2 = array('---','---','---','---','---','---','---','---','---','---','---','---','---','---','---');
$pass2 = str_replace($sansurle2,$editle2,$pass);

$securepass = mysql_real_escape_string($pass2);

if(empty($securepass)){ Header("Location:giris2.html"); }

$kontrol = mysql_query("SELECT * FROM musteriler WHERE mail='$securemail' and sifre='$securepass'");
$oku = mysql_fetch_array($kontrol);
$securemember = mysql_num_rows($kontrol);

if ($securemember == '0') {
Header("Location:giris2.html");
mysql_close(); 
}else{
$_SESSION['sira'] = $oku['id'];
$_SESSION['adsoyad'] = $oku['adsoyad'];
$_SESSION['mail'] = $oku['mail'];
$_SESSION['rutbe'] = "musteri";
Header("Location:mindex.php");
}
?>
Return current item: MythPHP