久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<small id='TQDi2'></small><noframes id='TQDi2'>

    <i id='TQDi2'><tr id='TQDi2'><dt id='TQDi2'><q id='TQDi2'><span id='TQDi2'><b id='TQDi2'><form id='TQDi2'><ins id='TQDi2'></ins><ul id='TQDi2'></ul><sub id='TQDi2'></sub></form><legend id='TQDi2'></legend><bdo id='TQDi2'><pre id='TQDi2'><center id='TQDi2'></center></pre></bdo></b><th id='TQDi2'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='TQDi2'><tfoot id='TQDi2'></tfoot><dl id='TQDi2'><fieldset id='TQDi2'></fieldset></dl></div>
  1. <tfoot id='TQDi2'></tfoot>
    <legend id='TQDi2'><style id='TQDi2'><dir id='TQDi2'><q id='TQDi2'></q></dir></style></legend>

    • <bdo id='TQDi2'></bdo><ul id='TQDi2'></ul>

    1. PHP 準備好的語句問題

      PHP Prepared Statement Problems(PHP 準備好的語句問題)

            <tbody id='UpJGD'></tbody>
          • <legend id='UpJGD'><style id='UpJGD'><dir id='UpJGD'><q id='UpJGD'></q></dir></style></legend>
              <bdo id='UpJGD'></bdo><ul id='UpJGD'></ul>
              1. <tfoot id='UpJGD'></tfoot>
              2. <i id='UpJGD'><tr id='UpJGD'><dt id='UpJGD'><q id='UpJGD'><span id='UpJGD'><b id='UpJGD'><form id='UpJGD'><ins id='UpJGD'></ins><ul id='UpJGD'></ul><sub id='UpJGD'></sub></form><legend id='UpJGD'></legend><bdo id='UpJGD'><pre id='UpJGD'><center id='UpJGD'></center></pre></bdo></b><th id='UpJGD'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='UpJGD'><tfoot id='UpJGD'></tfoot><dl id='UpJGD'><fieldset id='UpJGD'></fieldset></dl></div>

                <small id='UpJGD'></small><noframes id='UpJGD'>

                本文介紹了PHP 準備好的語句問題的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                慢慢習慣了 PHP 準備好的語句,但仍然出現這個錯誤

                slowly getting used to PHP prepared statements, however still get this error

                警告:mysqli_stmt::bind_result():綁定變量的數量與第 20 行 C:UsersPCDocumentsXAMPPhtdocslogin.php 中準備好的語句中的字段數不匹配".

                "Warning: mysqli_stmt::bind_result(): Number of bind variables doesn't match number of fields in prepared statement in C:UsersPCDocumentsXAMPPhtdocslogin.php on line 20".

                 <?php
                
                 $mysqli = new mysqli('localhost', 'c3337015', 'c3337015', 'members');
                
                if (mysqli_connect_errno()) {
                    printf("Connect failed: %s
                ", mysqli_connect_error());
                    exit();
                    }
                
                 if(isset($_GET['loginEmail'])){
                
                 session_start();
                
                    $stmt = $mysqli->prepare("SELECT Email FROM members WHERE Email=? AND  Password=? LIMIT 1");
                    $email = $_GET['loginEmail'];
                    $password = $_GET['loginPassword'];
                    $password = sha1($password);
                    $stmt->bind_param('ss', $email, $password);
                    $stmt->execute();
                    $stmt->bind_result($email, $password);
                    $stmt->store_result();
                    if($stmt->num_rows == 1)  //To check if the row exists
                        {
                            while($stmt->fetch()) //fetching the contents of the row
                
                              {$_SESSION['Logged'] = 1;
                               $_SESSION['Email'] = $email;
                               header('Location: index.php');
                               exit();
                               }
                        }
                        else {
                            echo "Wrong Username or Password!";
                        }
                        $stmt->close();
                    }
                    else 
                    {   
                    echo "Something went Wrong";
                    }
                $mysqli->close();
                ?>
                

                推薦答案

                $stmt->bind_result($email, $password);
                

                您正在綁定 2 個變量,但只要求一個:SELECT Email FROM members.

                You are binding 2 variables, but only asking for one: SELECT Email FROM members.

                我還建議對 bind_result 使用不同的變量,因為它和 bind_param 都適用于引用.

                I'd also suggest using different variables for bind_result, as it and bind_param both work on references.

                $stmt->bind_result($userEmail);
                

                這篇關于PHP 準備好的語句問題的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                store_result() and get_result() in mysql returns false(mysql 中的 store_result() 和 get_result() 返回 false)
                Call to undefined function mysqli_result::num_rows()(調用未定義的函數 mysqli_result::num_rows())
                mysqli_fetch_array returning only one result(mysqli_fetch_array 只返回一個結果)
                PHP MySQLi Multiple Inserts(PHP MySQLi 多次插入)
                How do I make sure that values from MySQL keep their type in PHP?(如何確保 MySQL 中的值在 PHP 中保持其類型?)
                Fatal error: Call to undefined method mysqli::error()(致命錯誤:調用未定義的方法 mysqli::error())
                  <legend id='c2pbI'><style id='c2pbI'><dir id='c2pbI'><q id='c2pbI'></q></dir></style></legend>

                  • <small id='c2pbI'></small><noframes id='c2pbI'>

                      • <bdo id='c2pbI'></bdo><ul id='c2pbI'></ul>

                        <i id='c2pbI'><tr id='c2pbI'><dt id='c2pbI'><q id='c2pbI'><span id='c2pbI'><b id='c2pbI'><form id='c2pbI'><ins id='c2pbI'></ins><ul id='c2pbI'></ul><sub id='c2pbI'></sub></form><legend id='c2pbI'></legend><bdo id='c2pbI'><pre id='c2pbI'><center id='c2pbI'></center></pre></bdo></b><th id='c2pbI'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='c2pbI'><tfoot id='c2pbI'></tfoot><dl id='c2pbI'><fieldset id='c2pbI'></fieldset></dl></div>
                        <tfoot id='c2pbI'></tfoot>

                            <tbody id='c2pbI'></tbody>
                          主站蜘蛛池模板: 国产一区二区在线免费视频 | 91在线免费视频 | 污片在线观看 | 91在线区 | 波多野结衣在线观看一区二区三区 | 久久精品国产一区二区三区 | 久久国产综合 | 国外成人在线视频 | 丁香婷婷综合激情五月色 | 国产真实乱对白精彩久久小说 | 国产精品视频二区三区 | 亚洲日本免费 | 精品久久久久久久久亚洲 | 蜜桃视频在线观看免费视频网站www | 成人毛片在线视频 | 欧美日韩黄色一级片 | 免费二区| 给我免费的视频在线观看 | 国产一区二区三区久久久久久久久 | 国产在线精品一区二区三区 | 日韩成人一区 | 午夜视频一区二区三区 | 久久国产精品一区二区三区 | 国产一区久久 | 午夜免费网站 | 日本视频中文字幕 | 韩国av网站在线观看 | 夜夜艹天天干 | 在线观看黄色电影 | 亚洲精品视频一区二区三区 | 丝袜一区二区三区 | 亚洲精品4 | 国产视频中文字幕 | 天天综合天天 | 偷拍亚洲色图 | 免费在线观看av网址 | 在线观看a视频 | 婷婷久久五月 | 精品国产乱码久久久久久久久 | 婷婷中文在线 | 在线免费视频一区 |