Hỏi về file login.php
Hello & Welcome to our community. Is this your first visit? Đăng Ký
Follow us on
Follow us on Facebook Follow us on Twitter Linked In Flickr Watch us on YouTube My Space Blogger
 
Kết quả 1 đến 4 của 4
  1. #1
    Thành Viên
    Ngày tham gia
    Dec 2012
    Bài viết
    134
    Thanks
    58
    Thanked 487 Times in 33 Posts

    Hỏi về file login.php

    Đây là code trang login.php của em

    PHP Code:
    <?php
    $username 
    $_POST['username'] or $_COOKIE['username'];
    $password $_POST['password'] or $_COOKIE['password'];
    include(
    'config.php');
    if(isset(
    $_POST['submit']) or isset($_COOKIE['username']))
    {
    $ok mysql_query("Select * from account where id = '$username' and password = '$password'");
    if(
    mysql_num_rows($ok) == 0)
    {
    $notice "Sai tài khoản hoặc mật khẩu";
    }
    if(
    mysql_num_rows($ok) > and isset($_COOKIE['username']))
    {
    header('Location: chonser/chonserver.php');
    }
    if(
    mysql_num_rows($ok) > and $_COOKIE['username'] == "")
    {
    setcookie("username",$username,time() + 1800);
    setcookie("password",$password,time() + 1800);
    header('Location: chonser/chonserver.php');
    }
    }
    ?>                                  
    <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            
            <meta name="keywords" content="Dao kiem vo song">
            <title>Đăng nhập đao kiếm vô song</title>
            <link href="./images/styles.css" rel="stylesheet" type="text/css" media="all">
        </head>
    <script language=JavaScript>
    <!--
    //Disable right click script III- By Renigade ([email protected])
    // Redistributed for Vn communities by all4elva.com

    var message="";

    function clickIE() {if (document.all) {(message);return false;}}
    function clickNS(e) {if
    (document.layers||(document.getElementById&&!document.all)) {
    if (e.which==2||e.which==3) {(message);return false;}}}
    if (document.layers)
    {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
    else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

    document.oncontextmenu=new Function("return false")
    // -->
    </script>
        <body>
        <center>
            <!--Login-->
            <div id="container">
                <div id="sv_nav">
                    <a class="nav_home" href="index.php" ></a>
                    <a class="nav_card" href="" ></a>
                </div>
                <div id="login">
                <div id="log_col">
                
                                <form id="loginForm" name="loginForm" method="post" action="login.php">


    <input type="text" name="username" id="username" value="" helper="formText" placeholder="Tài khoản">

    <input type="password" name="password" id="password" value="" helper="formPassword" placeholder="Mật khẩu">

    <tr><font color='red'></font></tr>

    <input type="submit" name="submit" id="loginForm" value="Đăng Nhập" class="sub" ><div id="xbutton">
    <a class="button" href="reg.php">Đăng ký</a>
    </div></form>            
                            </div>
                <div id="bot_log"></div>
                </div>
                <div id="sv_col">
                            </div>
            </div>
            <!--END Login-->
        

    </center></body></html>
    Cho em hỏi là nó sai ở đâu mà lúc vô nó ra lỗi này

    Notice: Undefined index: user in D:\GPHDJWS\server\GPHweb\www\login.php on line 7 Call Stack: 0.0195 335240 1. {main}() D:\GPHDJWS\server\GPHweb\www\login.php:0 Notice: Undefined index: pass in D:\GPHDJWS\server\GPHweb\www\login.php on line 8 Call Stack: 0.0195 335240 1. {main}() D:\GPHDJWS\server\GPHweb\www\login.php:0
    Khách viếng thăm hãy cùng DemonSlayer xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  2. #2
    Thành Viên
    Ngày tham gia
    Aug 2012
    Bài viết
    67
    Thanks
    3
    Thanked 84 Times in 8 Posts

    Ðề: Hỏi về file login.php

    code login thì ổn, coi off cái error trong php.ini xem
    Khách viếng thăm hãy cùng anhtuan1985 xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  3. #3
    Thành Viên
    Ngày tham gia
    Dec 2012
    Bài viết
    134
    Thanks
    58
    Thanked 487 Times in 33 Posts

    Ðề: Hỏi về file login.php

    Trích dẫn Gửi bởi anhtuan1985 [Only registered and activated users can see links. ]
    code login thì ổn, coi off cái error trong php.ini xem
    Nó nằm ở đâu nhỉ
    Khách viếng thăm hãy cùng DemonSlayer xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

  4. #4
    Thành Viên Tâm Huyết hai07dv's Avatar
    Ngày tham gia
    Nov 2010
    Đang ở
    Đẹp Nhức Nhối
    Bài viết
    2,028
    Thanks
    871
    Thanked 2,293 Times in 544 Posts

    Ðề: Hỏi về file login.php

    Trích dẫn Gửi bởi DemonSlayer [Only registered and activated users can see links. ]
    Nó nằm ở đâu nhỉ
    D:\GPHDJWS\server\GPHweb\soft\php5.3.3\php.ini


    Code trên chạy = xampp thì bình thường
    Khách viếng thăm hãy cùng hai07dv xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!

 

 

Các Chủ đề tương tự

  1. Cái file này là gì vậy mọi người ( Login Gunny vng )
    Bởi kutevip1064 trong diễn đàn CHUYÊN ĐỀ WEB GAMES
    Trả lời: 4
    Bài viết cuối: 02-11-12, 06:40 AM
  2. Xin soure file Login
    Bởi Secondhand™ trong diễn đàn Gunbound Server
    Trả lời: 0
    Bài viết cuối: 07-10-09, 03:40 PM
  3. source VB tạo file logIn cho MU đây
    Bởi congacon trong diễn đàn SQL Server & Website
    Trả lời: 36
    Bài viết cuối: 10-04-09, 04:26 PM
  4. Source tạo file Login cho Mu
    Bởi congacon trong diễn đàn Releases
    Trả lời: 1
    Bài viết cuối: 01-01-09, 09:36 PM
  5. File Login Fix Kết nối máy chủ thất bại
    Bởi changtraicaoquy trong diễn đàn Hỏi Đáp/ Yêu Cầu
    Trả lời: 7
    Bài viết cuối: 14-07-07, 04:54 PM

Quyền viết bài

  • Bạn Không thể gửi Chủ đề mới
  • Bạn Không thể Gửi trả lời
  • Bạn Không thể Gửi file đính kèm
  • Bạn Không thể Sửa bài viết của mình
  •  
Múi giờ GMT +7. Bây giờ là 06:14 PM.
vBulletin®, Copyright ©2000-2011, Jelsoft Enterprises Ltd.
CLBGamesVN không chịu trách nhiệm về Luật Bản Quyền của các tài liệu, bài viết v.v...được đăng tải trên diễn đàn này.
Diễn đàn phát triển dưới sự đóng góp của tất cả thành viên. BQT chỉ là những người thành lập ra sân chơi, quản lý và duy trì về mặt kỹ thuật, nội dung khi hợp lệ.