Arşivimde vardı.Umarım işinize yarar.Veritabani bilgilerinizi kendinize göre ayarlayın baglantidosyaniz.php yerine ayarladığınız dosyayı include edin.Uye olma formu uye kaydı, giris formu ve giris kontrolü var.
uyeolform.php
<form id="form1" name="form1" method="post" action="uyeol.php">
<table width="61%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="16%">Kullanici Adi : </td>
    <td width="84%"><input name="kullanici" type="text" id="kullanici" /></td>
  </tr>
  <tr>
    <td>Şifre : </td>
    <td><input name="sifre" type="password" id="sifre" /></td>
  </tr>
  <tr>
    <td colspan="2">
      <input type="submit" name="Submit" value="&Uuml;yeliği Tamamla" />
    </td>
  </tr>
</table>
  </form>
uyeol.php
<?php
include("baglantidosyaniz.php");
$post_kullanici=$_POST['kullanici'];
$post_sifre=$_POST['sifre'];
if ($post_kullanici=="" || $post_sifre=="") {
echo "Lütfen Geri Dönüp Boş Bıraktığınız Yerleri Doldurunuz.";
}else{
$sorgu=mysql_query("INSERT INTO uyeler (kullanici_adi, sifre) values ('$post_kullanici', '$post_sifre')");
if ($sorgu) {
echo "Üyeliginiz Tamamlandi";
}else{
echo "Üyeliğiniz Tamamlanamadı";
}
}
?>
girisform.php
<form id="form1" name="form1" method="post" action="giris.php">
<table width="61%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="16%">Kullanici Adi : </td>
    <td width="84%"><input name="kullanici" type="text" id="kullanici" /></td>
  </tr>
  <tr>
    <td>Şifre : </td>
    <td><input name="sifre" type="password" id="sifre" /></td>
  </tr>
  <tr>
    <td colspan="2">
      <input type="submit" name="Submit" value="Oturum A&ccedil;" />
    </td>
  </tr>
</table>
  </form>
giris.php
<?php
ob_start();
session_start();
include("baglantidosyaniz.php");
$post_kullanici=$_POST['kullanici'];
$post_sifre=$_POST['sifre'];
$sorgu=mysql_fetch_array(mysql_query("SELECT * FROM uyeler WHERE kullanici_adi='$post_kullanici'"));
if (($post_kullanici!="" || $post_sifre!="") && ($post_kullanici==$sorgu['kullanici_adi'] && $post_sifre==$sorgu['sifre'])) {
$_SESSION['durum']="girildi";
$_SESSION['user']=$post_kullanici;
header("Location: index.php");
}else{
echo "lütfen forma girdiğiniz değerleri kontrol ediniz.";
}
?>