sql("SELECT * FROM uye WHERE uye_adi='".$uye."' OR email='".$email."' "); if (mysql_num_rows($sql) > 0) { header ("Location:kayit.php?kayit=no"); exit(); } else { $sql = $db->sql(" insert into uye (uyeID,uye_adi,sifre,email,adisoyadi,uye_tipi,aktivasyon_kodu,aktivasyon,Tel,Gsm,sehir,ilce,firma,sektor,ebulten,uyetarih) values ('','".trim ($uye)."', '". md5($sifre)."','".$email."','".$adisoyadi."','0', '".$aktivasyonkodu."', '0','".$tel."','".$gsm."','".$sehir."', '".$ilce."','".$firma."','".$sektor."', '".$ebulten."',now())"); header("Location:kayit.php?kayit=ok"); } break; case 'giris'; $db = new db(); $sql =$db->sql("SELECT * FROM uye "); $row = mysql_fetch_array($sql); if ($uye == $row['uye_adi'] && md5($sifre) == $row['sifre']) { header ("Location:index.php?giris=ok"); session_start(); $_SESSION['uyeID'] = $row['uyeID']; $_SESSION['uye_adi'] = $row['uye_adi']; $_SESSION['email'] = $row['email']; } else { header ("Location:index.php?giris=no"); } break; case 'cikis'; session_start(); session_unset(); session_destroy(); header("Location:index.php?cikis=ok"); break; } ?>