• <optgroup id="y8u0s"><td id="y8u0s"></td></optgroup>
  • <li id="y8u0s"><cite id="y8u0s"></cite></li>
  • <samp id="y8u0s"></samp>
    <rt id="y8u0s"></rt>
  • <xmp id="y8u0s"><li id="y8u0s"></li></xmp>
    <\/td>\n 密 碼:<\/td>\n 驗證碼:<\/td>\n \"<\/td>\n <\/td>\n <\/tr>\n <\/table>\n <\/div>\n<\/body>\n<\/html>\n\n<\/pre>loginCheck.php

    ??? ??? ?? ??
    <\/span><\/p>\n

    <\/p>\n

    <?php \n session_start();\n include(\"..\/conn\/connDB.php\");\n \n \/\/ 取得POST過來的參數(shù):\n $username=$_POST[\"username\"];\n $password=md5($_POST[\"password\"]);\n $authCode=$_POST[\"authCode\"];       \n \n $feedback=\"no\";\n\n\/\/對比是否==SESSION中的驗證碼,不能放在客戶端做,否則取不正確的值\n if($authCode==$_SESSION[\"VCODE\"]){\n\n   $SQL=\"select * from users where username='$username' and password='$password'\";\n   $result=mysql_query($SQL);\n   $rows=mysql_num_rows($result);\n  if($rows==1)                       \/\/ 驗證成功\n   $feedback=\"ok\";\n   $_SESSION[\"admin\"]=true;           \/\/為了后臺安全,存入SESSION,表明 ADMIN 已登錄,供后面調(diào)用\n  }\n  \n echo $feedback;\n \n?>\n<\/pre>? ??? ??? ??? ??? ??? ???, ??? ? ???? ?????? ????. 


    \n \n \n <\/p>\n ? ??? PHP ??? ??? ???? ??? ???? ???? ?? PHP ??? ?? ? PHP Ajax ?? ??? ???? ???, PHP ????? ??? ?? ????? ??? ??? ????.

    \n <\/p>\n

    <\/p>"}

    国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

    ? ??? ?? PHP ???? PHP ??? ?? ??? ???? ???? PHP Ajax ?? ??

    PHP ??? ?? ??? ???? ???? PHP Ajax ?? ??

    Jul 27, 2016 pm 04:56 PM

    ??? ???? ???? ?? AJAX? ???? ?? ???? ?? ?? ??? ??? ??? ??, ?? ??? ???? ?? ? ???? ??? ?? ?? ?? ?????. ? 3?? ??? ?????.

    yz.php: ????? ???? PHP ??? ??? ? ?? ? ????? ?? SESSION? ????. ??>
    index .php:??? ???? HTML ??
    loginCheck.php: ??? ??? ??? ??

    ??? ??? ????. one:

    yz.php ??

    <&#63;php
     session_start();
    
     //生成驗證碼圖
     Header("Content-type: image/PNG");
     //長與寬
     $im = imagecreate(44,18);
     // 設置背景色:
     $back = ImageColorAllocate($im, 245,245,245);
     // 填充背景色:
     imagefill($im,0,0,$back);
    
     srand((double)microtime()*1000000);
     $vcodes;
     //生成4位數(shù)字
     for($i=0;$i<4;$i++){
      $font = ImageColorAllocate($im, rand(100,255),rand(0,100),rand(100,255));
      $authnum=rand(1,9);
      $vcodes.=$authnum;
      imagestring($im, 5, 2+$i*10, 1, $authnum, $font);
     }
    
     //加入干擾象素
     for($i=0;$i<100;$i++){
      $randcolor = ImageColorallocate($im,rand(0,255),rand(0,255),rand(0,255));
      imagesetpixel($im, rand()%70 , rand()%30 , $randcolor);
     }
      
     ImagePNG($im);
     ImageDestroy($im);
    
     // 將四位的驗證碼保存在 SESSION 里,登錄時調(diào)用對比
     $_SESSION["VCODE"]=$vcodes;
    &#63;>
    
    
    index.php: ??? ? ???? $_SESSION["VCODE"]? ???? ???. ??? ??? ? ?? ?? ?? ??? ?????

    loginCheck.php?? ?????


    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"> 
    <head>
    <meta http-equiv="Content-Type" c type="text/css" href="\css\a.css">
    <style type="text/css">
    <!--
      #main{
       font-family:宋體;
       font-size:10pt;
       text-align:center;
       margin-top:510px;
      }
      
      body{
       background-attachment:fixed;
       background-position:center;
       background-image:url(./images/w2.jpg);
       background-repeat: no-repeat;
      }
      
      #authCode{background-Color:#F8F9FF;}
      
      table{text-align:center;}
    
    //-->
    </style>
    <script type="text/javascript" src="./js/trim.js"></script>
    <script type="text/javascript">
    <!--
    
     function clearX(){
      document.getElementById('authCode').value="";
     }
    
     // 點擊圖片重新獲得新的驗證碼:
     function getVCode() { 
      var vcode=document.getElementById('vcode'); 
      vcode.src ='yz.php&#63;nocache='+new Date().getTime(); 
     }
    
    
     //定義XMLHttpRequest對象
     var xmlHttp;     
    
     // 創(chuàng)建 XMLHttpRequest:
     function createXmlHttpRequest(){
     var xmlHttp=null;
     try{
      // Firefox, Opera 8.0+, Safari
      xmlHttp=new XMLHttpRequest();
     }catch(e){
      // Internet Explorer
      try{
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }catch(e){
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
     }
     return xmlHttp;
     }
    
     // AJAX 檢查登錄: 有密碼,要用POST 提交
     function login(){
      var authCode=trim(document.getElementById('authCode').value);
      var username=trim(document.getElementById('username').value);
      var password=trim(document.getElementById('password').value);
      if(username=="" || password=="" || authCode==""){
       alert("請輸入用戶名和密碼和驗證碼!");
       return false;
      }else{
       if(!xmlHttp) xmlHttp=createXmlHttpRequest();
        var send_string="username="+username+"&password="+password+"&authCode="+authCode+"&fresh="+Math.random();
        xmlHttp.open("POST","loginCheck.php",true); 
        xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); 
        xmlHttp.send(send_string); 
        xmlHttp.
         if(xmlHttp.readystate==4 && xmlHttp.status==200){
          var answer=xmlHttp.responseText;
          if(answer=="ok")                     //跳轉到管理中心頁面
           window.location.href="adminCenter.php";
          else{
           alert("用戶名密碼或驗證碼不正確! 請重新輸入!");
           document.getElementById('username').focus();
          }
        }
       }
      }
     }
    
    //-->
    </script>
    </head>
    <body  /></td>
         <td>密   碼:<input type="password" /></td>
         <td>驗證碼:<input type="text" size="6" maxlength="4" value="驗證碼" /></td>
         <td><img src="yz.php" alt=" PHP+Ajax驗證碼驗證用戶登錄"  /></td>
         <td><input type="submit" value="登 錄" /></td>
         </tr>
        </table>
     </div>
    </body>
    </html>
    
    
    loginCheck.php

    ??? ??? ?? ??

    <&#63;php 
     session_start();
     include("../conn/connDB.php");
     
     // 取得POST過來的參數(shù):
     $username=$_POST["username"];
     $password=md5($_POST["password"]);
     $authCode=$_POST["authCode"];       
     
     $feedback="no";
    
    //對比是否==SESSION中的驗證碼,不能放在客戶端做,否則取不正確的值
     if($authCode==$_SESSION["VCODE"]){
    
       $SQL="select * from users where username='$username' and password='$password'";
       $result=mysql_query($SQL);
       $rows=mysql_num_rows($result);
      if($rows==1)                       // 驗證成功
       $feedback="ok";
       $_SESSION["admin"]=true;           //為了后臺安全,存入SESSION,表明 ADMIN 已登錄,供后面調(diào)用
      }
      
     echo $feedback;
     
    &#63;>
    
    ? ??? ??? ??? ??? ??? ???, ??? ? ???? ?????? ????.


    ? ??? PHP ??? ??? ???? ??? ???? ???? ?? PHP ??? ?? ? PHP Ajax ?? ??? ???? ???, PHP ????? ??? ?? ????? ??? ??? ????.

    ? ????? ??
    ? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

    ? AI ??

    Undresser.AI Undress

    Undresser.AI Undress

    ???? ?? ??? ??? ?? AI ?? ?

    AI Clothes Remover

    AI Clothes Remover

    ???? ?? ???? ??? AI ?????.

    Video Face Swap

    Video Face Swap

    ??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

    ???

    ??? ??

    ???++7.3.1

    ???++7.3.1

    ???? ?? ?? ?? ???

    SublimeText3 ??? ??

    SublimeText3 ??? ??

    ??? ??, ???? ?? ????.

    ???? 13.0.1 ???

    ???? 13.0.1 ???

    ??? PHP ?? ?? ??

    ???? CS6

    ???? CS6

    ??? ? ?? ??

    SublimeText3 Mac ??

    SublimeText3 Mac ??

    ? ??? ?? ?? ?????(SublimeText3)

    ???

    ??? ??

    ?? ????
    1747
    16
    Cakephp ????
    1600
    56
    ??? ????
    1542
    28
    PHP ????
    1400
    31
    ???
    PHP ?? API ????? ?? ??? ?????? PHP ?? API ????? ?? ??? ?????? Jun 14, 2025 am 12:27 AM

    ToversionAphp ??, forclarityandeasofrouting, ac

    PHP?? ?? ? ??? ????? ????????? PHP?? ?? ? ??? ????? ????????? Jun 20, 2025 am 01:03 AM

    TOSECURELYHANDLEAUSTENCENDACTIONANDACTERIZINGINPHP, FORCUCTSESTEPS : 1. ALWAYSHASHPASSWORTHPASSWORD_HASH () ? VERVERIFYUSINGPANSWORD_VERIFY (), usePREPAREDSTATEMENTSTOPREVENTSQLINGERGED, andSTOREUSERSESSEATAIN $ _SESSIONSAFTERLOGIN.2.impleplempletrole ?? ACCESSC

    PHP? ?? ?? (??)? ???? ?? ?? ? ? ????? PHP? ?? ?? (??)? ???? ?? ?? ? ? ????? Jun 14, 2025 am 12:25 AM

    phpdoesnothaveAbuilt-inweakMapButofferSweakReference.1.WeakReenceAllowsholdingReferences withoutpreventinggarbageCollection.2.ItusteForCaching, Eventlisteners, andMetAdataWithoutAftingObjectLifeCycles.3.youcoucococococococcinccing

    PHP? ?? ? ?? ?? ????? ????? ???? ?????? PHP? ?? ? ?? ?? ????? ????? ???? ?????? Jun 14, 2025 am 12:25 AM

    ProceduralAndObject-OrientedProgramming (OOP) InphpDiffersiMINTIFINTIONTERINGLISTURE, ??? ? ? DATAHANDLING

    PHP?? ?? ???? ??? ??? ?? ? ? ??????? PHP?? ?? ???? ??? ??? ?? ? ? ??????? Jun 19, 2025 am 01:05 AM

    PHP?? ?? ???? ???? ????? ??? ?? ??? ???? ?? ??? ??? ??? ???? ????. 1. finfo_file ()? ???? ?? ?? ??? ???? ???/jpeg? ?? ?? ?? ? ?????. 2. uniqid ()? ???? ??? ?? ??? ???? ? Web ?? ????? ??????. 3. php.ini ? html ??? ?? ?? ??? ???? ???? ??? 0755? ?????. 4. Clamav? ???? ???? ???? ??? ??????. ??? ??? ?? ???? ????? ???? ?? ??? ????? ???? ??? ? ??? ?????.

    PHP?? == (??? ??)? === (??? ??)? ???? ?????? PHP?? == (??? ??)? === (??? ??)? ???? ?????? Jun 19, 2025 am 01:07 AM

    PHP?? ==? ==? ?? ???? ?? ??? ??????. == ?? ??? ?? ?? ?????. ?? ??, 5 == "5"? true? ????, ?? ??? ???? ?? ?? ??? ????? ????? (? : 5 === "5"? false? ?????. ?? ?????? ===? ? ???? ?? ?????? == ?? ??? ??? ???? ?????.

    PHP? NOSQL ?????? (? : MongoDB, Redis)? ??? ?? ??? ? ????? PHP? NOSQL ?????? (? : MongoDB, Redis)? ??? ?? ??? ? ????? Jun 19, 2025 am 01:07 AM

    ?, PHP? ?? ?? ?? ?????? ?? MongoDB ? Redis? ?? NOSQL ??????? ?? ??? ? ????. ?? MongoDBPHP ???? (PECL ?? Composer? ?? ??)? ???? ????? ????? ??? ?????? ? ???? ????? ??, ??, ?? ? ?? ??? ?????. ??, Predis ????? ?? Phpredis ??? ???? Redis? ???? ?? ? ?? ? ??? ???? ??? ????? Phpredis? ???? ?? Predis? ?? ??? ?????. ? ? ?? ??? ???? ? ????? ????.

    php (, -, *, /, %)?? ?? ??? ??? ?????? php (, -, *, /, %)?? ?? ??? ??? ?????? Jun 19, 2025 pm 05:13 PM

    PHP?? ?? ??? ??? ???? ??? ??? ????. 1. ?? ??? ?? ? ?? ??? ??? ???? ???? ??? ? ????. ??? ??? ???? ????? ????? ???? ????. 2. ?? ?? ?? - ??, ??? ???? ?? ??? ?????. 3. ?? ???? ??? ??? ???? ??? ??? ?????. 4. Division? / ??? ???? 0?? ??? ?? ????? ??? ?? ??? ?? ? ? ????. 5. ???? ??? ???? ?? ?? ? ?? ??? ???? ? ??? ? ???, ??? ?? ? ? ??? ??? ???? ?????. ? ???? ???? ???? ??? ??? ??? ???? ?? ??? ? ??????? ????.

    See all articles