ya ben senin için basit yaptım birtane Yanlız Cıkış Yapmak için Cıkış butonuna iki kere tıklaman lazım
ayar.php
<?php
/*enc0der the_of_maho@hotmail.com enc0der@datapaylasim.com
*/
$baglan = @mysql_connect("localhost", "root", "");
if(! $baglan) die ("mysql hata");
@mysql_select_db("video") or die ("db hata");
mysql_query("SET NAMES 'latin5'");
?>index.php
<?php
session_start(); ob_start();
/*datapaylasim.com coder enc0der the_of_maho@hotmail.com enc0der@datapaylasim.com
*/
include("ayar.php");
$uye = $_SESSION['mail'];
$enc0der = $_GET['enc0der'];
function index(){
global $uye;
if($uye==""){
echo "<center>Oturum Cınızı</center> ";
}else{
echo $uye."hoş Geldin";
}
echo '<div align="center"><a href="index.php">Anasayfa| </a><a href="index.php?enc0der=uyeol"> UYE OL</a> |<a href="index.php?enc0der=admin">Admin Paneli</a>| <a href="index.php?enc0der=Cikis">CIKIŞ</a> </div>
';
}
function uyeol(){
echo "<form action=\"index.php?enc0der=uyekayit\" method=\"POST\">
<div align=\"center\">
<table border=\"0\" width=\"30%\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#800000\">
<tr>
<td colspan=\"3\" bgcolor=\"#800000\">
<p align=\"center\"><b><font color=\"#FFFFFF\">Uye Kayıt Formu</font></b></td>
</tr>
<tr>
<td width=\"33%\">E-Mail Adresiniz</td>
<td width=\"1%\">:</td>
<td width=\"65%\"><input type=\"text\" name=\"mail\" size=\"20\"></td>
</tr>
<tr>
<td width=\"33%\">Şifre</td>
<td width=\"1%\">:</td>
<td width=\"65%\"><input type=\"password\" name=\"sifre\" size=\"20\"></td>
</tr>
<tr>
<td width=\"33%\">Şifre Tekrar</td>
<td width=\"1%\">:</td>
<td width=\"65%\"><input type=\"password\" name=\"sifreiki\" size=\"20\"></td>
</tr>
<tr>
<td width=\"33%\"> </td>
<td width=\"1%\"> </td>
<td width=\"65%\"><input type=\"submit\" value=\"Üye Ol\">
<a href=\"http://www.datapaylasim.com/\">Datapaylasim.com</a></td>
</tr>
</table>
</div>
</form>";
}
function uyekayit(){
include("ayar.php");
$mail = $_POST['mail'];
$sifre = $_POST['sifre'];
$sifreiki = $_POST['sifreiki'];
$ekle = mysql_query("INSERT INTO uye (mail, sifre, sifreiki) values('$mail', '$sifre', '$sifreiki')");
if($ekle){
echo "<center> Uye Kaydı Başarılı ";
}else{
echo "<center> Bir Hata Meydana Geldi :)</center>";
}
}
function admin(){
global $uye;
if($uye=""){
header("location: login.php");
}else{
header("location: uye.php");
}
}
function Cikis(){
global $uye;
session_destroy();
unset($uye);
}
switch($enc0der){
default:
index();
break;
case "uyeol":
index();
uyeol();
break;
case "uyekayit":
index();
uyekayit();
break;
case "admin":
index();
admin();
break;
case "Cikis":
index();
Cikis();
break;
}
?>login.php
<?php
session_start(); ob_start();
/*datapaylasim.com coder enc0der the_of_maho@hotmail.com enc0der@datapaylasim.com
*/
include("ayar.php");
$mail = $_POST['mail'];
$sifre = $_POST['sifre'];
if(($mail=="") or ($sifre=="")){
echo "<center>Boş ALAN Bırakma</center>";
}else{
$gir = mysql_query("SELECT * FROM uye WHERE mail='$mail' and sifre='$sifre'");
if(mysql_num_rows($gir) > 0){
$_SESSION['mail'] = $mail;
header("location: uye.php");
}else{
echo "Kullanııcı Adı yada şifreniz yanlış";
}
}
?><?php
/*datapaylasim.com coder enc0der the_of_maho@hotmail.com enc0der@datapaylasim.com
*/
echo "<center>
<form action=\"login.php\" method=\"POST\">
<div align=\"center\">
<table border=\"0\" width=\"50%\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#800000\">
<tr>
<td colspan=\"3\" bgcolor=\"#800000\">
<p align=\"center\"><b><font color=\"#FFFFFF\">Uye giris Formu</font></b></td>
</tr>
<tr>
<td width=\"33%\">E-Mail Adresiniz</td>
<td width=\"1%\">:</td>
<td width=\"65%\"><input type=\"text\" name=\"mail\" size=\"20\"></td>
</tr>
<tr>
<td width=\"33%\">Şifre</td>
<td width=\"1%\">:</td>
<td width=\"65%\"><input type=\"text\" name=\"sifre\" size=\"20\"></td>
</tr>
<tr>
<td width=\"33%\"> </td>
<td width=\"1%\"> </td>
<td width=\"65%\"><input type=\"submit\" value=\"Giriş\">
<a href=\"http://www.datapaylasim.com/\">Datapaylasim.com</a></td>
</tr>
</table>
</div>
</form></center>";
?>
uye.php
<?php
session_start(); ob_start();
/*datapaylasim.com coder enc0der the_of_maho@hotmail.com enc0der@datapaylasim.com
*/
$uye = $_SESSION['mail'];
include("ayar.php");
if($uye==""){
echo "<center>giriş yap Yönlendiriliyorsunus</center>";
header("refresh: 2; url=login1.php");
}else{
echo "<p>Hoş geldiniz $uye </p>
<table border=\"1\" width=\"100%\" id=\"table1\" cellspacing=\"0\" cellpadding=\"0\" bordercolor=\"#800000\">
<tr>
<td bgcolor=\"#800000\" height=\"25\">
<p align=\"center\"><b><font color=\"#FFFFFF\">Mail Listesi</font></b></td>
</tr>";
$cek = mysql_query("select * from uye");
while($yaz=mysql_fetch_array($cek)){
$mail = $yaz['mail'];
echo "<tr>
<td>$mail</td>
</tr>
";
}
echo "</table>
";
}
?>sql dosyamız
-- phpMyAdmin SQL Dump
-- version 2.11.4
-- http://www.phpmyadmin.net
--
-- Anamakine: localhost
-- Üretim Zamanı: 08 Eylül 2008 saat 17:26:04
-- Sunucu sürümü: 5.0.51
-- PHP Sürümü: 5.2.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Veritabanı: `video`
--
-- --------------------------------------------------------
--
-- Tablo yapısı: `uye`
--
CREATE TABLE IF NOT EXISTS `uye` (
`id` int(11) NOT NULL auto_increment,
`mail` varchar(225) NOT NULL,
`sifre` varchar(225) NOT NULL,
`sifreiki` varchar(225) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin5 AUTO_INCREMENT=3 ;
--
-- Tablo döküm verisi `uye`
--
INSERT INTO `uye` (`id`, `mail`, `sifre`, `sifreiki`) VALUES
(1, 'the_of_maho@hotmail.com', '123456', '123456'),
(2, 'enc0der@datapaylasim.com', '123', '123');
login1.php