Location: PHPKode > projects > MythPHP > MythPHPv1.0/www/admin/musterieklendi.php
<?php include 'header.php'; ?>
		<div align="center">
		<?php

include '../ayar.php';

$madsoyad = $_POST['adsoyad'];
$mtelno = $_POST['telno'];
$mmail = $_POST['mail'];
$msifre1 = $_POST['pass'];
$msifre = base64_encode($msifre1);
$tcnum = $_POST['tcno'];
$notlar = $_POST['nots'];


function guvenlik($suz) {
$sansurle = array('CREATE','DELETE','SELECT','FROM','LIMIT','TABLE','MYISAM','*','ORDER','ASC','JOIN','BINARY','WHERE','<','>');
$editle = array('---','---','---','---','---','---','---','---','---','---','---','---','---','---','---');
$isle = str_replace($sansurle,$editle,$suz);

$safhal = mysql_real_escape_string($isle);

if(empty($safhal)){
@mysql_close();
}

return $safhal;

}

function notguvenlik($suz) {
$sansurle = array('CREATE','DELETE','SELECT','FROM','LIMIT','TABLE','MYISAM','*','ORDER','ASC','JOIN','BINARY','WHERE','<','>');
$editle = array('---','---','---','---','---','---','---','---','---','---','---','---','---','---','---');
$isle = str_replace($sansurle,$editle,$suz);

$safhal = mysql_real_escape_string($isle);

return $safhal;

}

$madsoyaddb = guvenlik($madsoyad);
$mtelnodb = guvenlik($mtelno);
$mmaildb = guvenlik($mmail);
$msifredb = guvenlik($msifre);
$mtcnodb = guvenlik($tcnum);
$mnotlardb = notguvenlik($notlar);


$sql = "INSERT INTO musteriler(adsoyad,telno,mail,sifre,tcno,notlar) VALUES('$madsoyaddb','$mtelnodb','$mmaildb','$msifredb','$mtcnodb','$mnotlardb')";

if(mysql_query($sql)){
echo '<img src="img/meklendi.png" id="eklendi" alt="eklendi" width="48" height="48" /><br /> <h2>Müþteri Baþarýyla Eklendi.</h2> <br />';
}else{
echo '<img src="img/meklenemedi.png" id="eklendi" alt="eklendi" width="48" height="48" /><br /> <h2>Müþteri Eklenemedi.</h2> <br />';
echo mysql_error();
}
?>
</div>
<?php include 'footer.php'; ?>
Return current item: MythPHP