+
1 3 3

:

  1. #1
    cs207       cs207
    20.11.2007
    5
    ()
    0
    : 0 (: 0).

    1nsk.ru
    :
    PHP :
    if(session_start())
    $%$%
    print(
    '   ');
    }
    $us=$_SESSION["user"];
    $pa=$_SESSION["pass"];
    if ((
    $us==$admin_username) and ($pa==$admin_password))    
    $%$%}
    else{
    print(
    '
    <form name="login" method="post" action="get.php">
    <div class="top" >   :</div>
    <div class="top" >:  <input type="text" name="user"></div>
    <div class="top" >: <input type="password" name="pass"></div>
    <div class="top" ><input type="submit" name="login_b" value=""></div>
    </form>
    '
    );
    }
    if (isset(
    $user))
        $%$%
            
    $_SESSION["user"] = $user;
            
    $_SESSION["pass"] = $pass;
        }
        
    if ((
    $us==$admin_username) and ($pa==$admin_password))    
    $%$%
       ... 
    4 :
    Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/cs207/domains/cs207.net/public_html/files/get.php:2) in /home/cs207/domains/cs207.net/public_html/files/get.php on line 4

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/cs207/domains/cs207.net/public_html/files/get.php:2) in /home/cs207/domains/cs207.net/public_html/files/get.php on line 4

  2. #2
    Mirage     Mirage       Mirage
    14.01.2007
    1,252
    ()
    0
    : 0 (: 0).

    . - , headers .
    . .
    :
    : , ?
    :
    , , .

  3. #3
    cs207       cs207
    20.11.2007
    5
    ()
    0
    : 0 (: 0).

    PHP :
    <?php
    if(session_start())
    $%$%
    print(
    '   ');
    }
    print(
    '<LINK href="style.css" type=text/css rel=stylesheet>');
    include(
    'config.php');

    $us=$_SESSION["user"];
    $pa=$_SESSION["pass"];
    if ((
    $us==$admin_username) and ($pa==$admin_password))    
    $%$%}
    else{
    print(
    '
    <form name="login" method="post" action="get.php">
    <div class="top" >   :</div>
    <div class="top" >:  <input type="text" name="user"></div>
    ,
    ,

    5

    , Mirage . .
    cs207; 23.12.2007 21:50.