Kasım 27, 2020

URL ile kullanıcı adı ve şifre ile veri sorgulatma

try{    
$db = new PDO('mysql:host=localhost;dbname=databaseadin;charset=utf8','databasekadi','sifre');    
$db->query("SET CHARACTER SET utf8_general_ci"); 
  //echo 'Bağlantı Başarıyla gerçekleştirildi !';
}catch(PDOException $e){
    echo 'Hata: '.$e->getMessage();
}
 
 
$username=$_GET['name'];
$memberpw=$_GET['password'];
$sorgu=$db->prepare("SELECT * FROM yazilimkontrol WHERE kullaniciadi=? and sifre =?");
$sorgu->execute(array($username,$memberpw));    
$islem=$sorgu->fetch();    
 if($islem)     {
echo '1';
 }else{
echo '0';
}

 

You may also like...

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir


Fatal error: Uncaught Error: Call to undefined method Ressio_HtmlOptimizer_Dom_Element::addChild() in /home/altiltoy/siteler/serdarakyol.com/wp-content/plugins/psn-pagespeed-ninja/ress/classes/htmloptimizer/dom.php:182 Stack trace: #0 /home/altiltoy/siteler/serdarakyol.com/wp-content/plugins/psn-pagespeed-ninja/ress/classes/plugin/widgets/widgets.php(66): Ressio_HtmlOptimizer_Dom->appendScriptDeclaration('!function(e,t,n...', Array, Object(Ressio_HtmlOptimizer_Dom_Element)) #1 /home/altiltoy/siteler/serdarakyol.com/wp-content/plugins/psn-pagespeed-ninja/ress/classes/plugin/widgets/widgets.php(151): Ressio_Plugin_Widgets->injectJsLoader(Object(Ressio_HtmlOptimizer_Dom), Object(Ressio_HtmlOptimizer_Dom_Element)) #2 /home/altiltoy/siteler/serdarakyol.com/wp-content/plugins/psn-pagespeed-ninja/ress/classes/dispatcher.php(117): Ressio_Plugin_Widgets->onHtmlIterateTagSCRIPTBefore(Object(Ressio_Event), Object(Ressio_HtmlOptimizer_Dom), Object(Ressio_HtmlOptimizer_Dom_Element)) #3 /home/altiltoy/siteler/serdarakyol.com/wp-content in /home/altiltoy/siteler/serdarakyol.com/wp-content/plugins/psn-pagespeed-ninja/ress/classes/htmloptimizer/dom.php on line 182