View Single Post
Sponsorlu Bağlantılar
Zoque.Forum
Advertisement
Old 31.03.2004   #5 (permalink)
umitvar
 
Üyelik Tarihi: 08.03.2004
Yer: ist
Yaş: 26
Mesaj: 12
Re: php session da sorunum var..yardım edin

[code]
<?
session_start();

if ($sayfa == 'logout') {
session_destroy();
}

include ("db_bilgileri.PHP");
mysql_connect("$host","$user","$pass") or die("veritabanina baglanilamadi");
mysql_select_db("$db");
?>

<HTML>
Kod:
<head>
<title>WELCOME</title>
<meta http-equiv="Content-Type" content="text/HTML; charset=windows-1254">
<meta http-equiv="content-type" content="text/HTML; charset=ISO-8859-9">
<meta http-equiv="Content-Language" content="tr">
<link href="style.CSS" rel="stylesheet" type="text/CSS">
<table width="770" cellspacing="0" cellpadding="0" align="center" border="0">
  <tr valign="top"> 
    <td width="190" align="center"><br> 
     <?	
            if (isset($login)){	
           $kontrol = mysql_query("SELECT * FROM uye WHERE username = '$username' AND password = '$password'");
	if (mysql_num_rows($kontrol))
	{
                                  $izinli = $HTTP_POST_VARS["username"];			
	             session_register("izinli");
                                   while($satir=mysql_fetch_array($kontrol)) 
		   include "panel.PHP";				
	}else
	{
	          include "giris.htm";
	         echo "<center>Geçersiz kullanıcı adı veya şifre girdiniz</center>";
	}
     }else
	{
                                include "giris.htm";
	}
?>  
<br> <table width="190" border="1" cellpadding="2" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF" style="font-weight:bold">
        <tr bgcolor="#FF6600"> 
          <td bgcolor="#33CCFF"> <table width="100%" border="0" cellspacing="0" cellpadding="1">
              <tr> 
                <td class="golge">Dizinler</td>
              </tr>
            </table>

<table width="100%" cellpadding="2" cellspacing="1">
        <tr> 
          <td bgcolor="#99CCFF"> <table width="100%" border="0" cellspacing="0" cellpadding="1">
              <tr> 
                <td height="16" class="golge">Baslık</td>
              </tr>
            </table></td>
        </tr>
        <tr align="center" bgcolor="#FFFFCC"> 
          <td height="350" align="left" bgcolor="#F5F5F5"> 
           
 <?
                
                     if(session_is_registered("izinli"))
                    {
	    if($sayfa=="1"){
		  include("a.PHP");
	   }
	       else if($sayfa=="2"){
		include("b.PHP");
	  }
                    }
          ?>
 
</tr>
</table>
işte buyrdun kodum bu..
umitvar şu an çevrimdışı   Mesajdan alıntı yaparak yeni bir cevap ekleyin