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

include 'ayar.php';

$aad1 = $_POST['alanadi1'];
$aad2 = $_POST['alanadi2'];
$nots = $_POST['mnot'];
$mbilgi = $_SESSION['adsoyad'];

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;

}

$aad1s = guvenlik($aad1);
$aad2s = guvenlik($aad2);
$notss = notguvenlik($nots);

$sql = "INSERT INTO asiparisler(musteribil,alanadi1,alanadi2,nots,tarih) VALUES('$mbilgi','$aad1s','$aad2s','$nots','$tarih - $saat')";

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