• 11-03-2009, 21:50:56
    #19
    session start i giris.php nin en üstüne yaz

    <?php
    session_start();

    böyle baslasin
  • 11-03-2009, 22:03:36
    #20
    Kimlik doğrulama veya yönetimden onay bekliyor.
    hocamm bu hatayı verdi şimdide

    Warning: Cannot modify header information - headers already sent by (output started at /home/site/public_html/yk/giris.php:11) in /home/site/public_html/yk/giris.php on line 96

    giris.php
    <?php
    session_start();
    ?>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=windows-1254">
    <title>Yönetici Girişi</title>
    
    <style type="text/css">
    /*----------Text Styles----------*/
    .ws6 {font-size: 8px;}
    .ws7 {font-size: 9.3px;}
    .ws8 {font-size: 11px;}
    .ws9 {font-size: 12px;}
    .ws10 {font-size: 13px;}
    .ws11 {font-size: 15px;}
    .ws12 {font-size: 16px;}
    .ws14 {font-size: 19px;}
    .ws16 {font-size: 21px;}
    .ws18 {font-size: 24px;}
    .ws20 {font-size: 27px;}
    .ws22 {font-size: 29px;}
    .ws24 {font-size: 32px;}
    .ws26 {font-size: 35px;}
    .ws28 {font-size: 37px;}
    .ws36 {font-size: 48px;}
    .ws48 {font-size: 64px;}
    .ws72 {font-size: 96px;}
    .wpmd {font-size: 13px;font-family: 'Arial';font-style: normal;font-weight: normal;}
    /*----------Para Styles----------*/
    DIV,UL,OL /* Left */
    {
     margin-top: 0px;
     margin-bottom: 0px;
    }
    </style>
    
    <style type="text/css">
    div#container
    {
    	position:relative;
    	width: 859px;
    	margin-top: 0px;
    	margin-left: auto;
    	margin-right: auto;
    	text-align:left; 
    }
    body {text-align:center;margin:0}
    </style>
    
    </head>
    
    <body bgColor="#99CCFF">
    
    <div id="container">
    <div id="roundrect1" style="position:absolute; overflow:hidden; left:276px; top:64px; width:309px; height:271px; z-index:0"><img border=0 src="images/roundrect22985078.gif"></div>
    
    <div id="text1" style="position:absolute; overflow:hidden; left:276px; top:78px; width:308px; height:39px; z-index:1"><div class="wpmd">
    <div align=center><font class="ws22">ADMİN PANEL GİRİŞ</font></div>
    </div></div>
    
    <div id="text3" style="position:absolute; overflow:hidden; left:285px; top:150px; width:289px; height:119px; z-index:1">
    <form action="" method="post">
    <table width="100%">
      <tr>
        <td width="35%" bordercolor="#99CCFF">Kullanıcı Adı :</td>
        <td width="65%" bordercolor="#99CCFF"><span style="color: navy; border-style: none; background-color: silver">
          <input type="text" name="user" id="user" size="20">
        </span></td>
      </tr>
      <tr>
        <td bordercolor="#99CCFF">Şifre :</td>
        <td bordercolor="#99CCFF"><span style="color: navy; border-style: none; background-color: silver">
          <input type="password" name="sifre" is="sifre" size="20">
        </span></td>
      </tr>
      <tr>
        <td bordercolor="#99CCFF">&nbsp;</td>
        <td bordercolor="#99CCFF"><label>
          <input type="submit" name="submit" id="submit" value="Giriş">
        </label></td>
      </tr>
    </table>
    <?php
    if($_POST){
    
    include("ayar.php");
    
    $sor= mysql_query("select * from yonetici where user = '".mysql_real_escape_string($_POST["user"])."' and sifre = '".mysql_real_escape_string($_POST["sifre"])."' ");
    if(mysql_num_rows($sor)>0){
    		$_SESSION["oturumvar"] = 1;
    		$_SESSION['user'] = $_POST['user'];
    		session_register();
    		header('Location: index.php');
    }else{
    echo "<script type='text/javascript'>  
    alert('Kullanıcı Adı veya Şifre Yanlış Lütfen Tekrar Deneyiniz.');
    </script>  ";
    }
    }
    ?>
    </form>
    </div>
    
    
    </div></body>
    </html>
  • 11-03-2009, 22:32:19
    #21
    <?php
    ob_start();
    session_start();
    ?>

    sayfanin en altinada

    <?php
    ob_end_flush();
    ?>
  • 12-03-2009, 00:18:28
    #22
    Üyeliği durduruldu
    php kodlarını ortaya değilde başa yazarsan hata vermiyecektir.

    <?php
    session_start();
    if($_POST){

    include(
    "ayar.php");

    $sor= mysql_query("select * from yonetici where user = '".mysql_real_escape_string($_POST["user"])."' and sifre = '".mysql_real_escape_string($_POST["sifre"])."' ");
    if(
    mysql_num_rows($sor)>0){
    $_SESSION["oturumvar"] = 1;
    $_SESSION['user'] = $_POST['user'];
    session_register();
    header('Location: index.php');
    }else{
    echo
    "<script type='text/javascript'>
    alert('Kullanıcı Adı veya Şifre Yanlış Lütfen Tekrar Deneyiniz.');
    </script> "
    ;
    }
    }
    ?>

    html kodları
    .
    .
    .