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

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

      <tfoot id='RrDJe'></tfoot>

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

      如何檢查郵箱是否已經注冊?

      How to check if email is already registered?(如何檢查郵箱是否已經注冊?)
        <bdo id='u3jAb'></bdo><ul id='u3jAb'></ul>

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

            1. <small id='u3jAb'></small><noframes id='u3jAb'>

                  <tbody id='u3jAb'></tbody>
              • 本文介紹了如何檢查郵箱是否已經注冊?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在嘗試檢查是否已經使用 PDO 注冊了電子郵件,但到目前為止我還沒有找到一個好的方法.這就是我迄今為止所擁有的.如果有幫助,連接變量是$con".另外,我需要在同一個文檔中使用連接變量還是在包含的文檔中工作?

                I am trying to check to see if an email is already registered using PDO, but I have not found a good way to do this so far. This is what I have so far. And the connection variable is "$con" if that helps. Also, do I need the connection variable in the same document or will it being in a document that is included work?

                <link rel="stylesheet" type="text/css" href="csserrors.css">
                <?php
                require 'header.php';
                if (!$_POST['submit']) {
                ?>
                <html>
                <a href="register.html">Regsiter here!</a>
                <?php
                } else {
                    require 'connect.php';
                    $firstname = ($_POST['firstname']);
                    $lastname = ($_POST['lastname']);
                    $email = ($_POST['email']);
                    $password = ($_POST['password']);
                    $passwordconf = ($_POST['passwordconf']);
                
                    $errorfields = "<p class='errormsg'>Please fill out all the fields!</p>";
                    if (empty($firstname) || empty($lastname) || empty($email) || empty($password) || empty($passwordconf)) {
                        echo "$errorfields";
                    }
                    $erroremail = "<p class='errormsg'>Email is not in name@domain format!</p>";
                    $regex = "/^[a-z0-9]+([_.-][a-z0-9]+)*@([a-z0-9]+([.-][a-z0-9]+)*)+.[a-z]{2,}$/i";
                    if (!preg_match($regex, $email)) {
                        echo "$erroremail";
                    }
                    $errorpassword = "<p class='errormsg'>You passwords do not match!</p>";
                    if ($password != $passwordconf) {
                        echo "$errorpassword";
                    }
                
                    //this is where email is checked
                }
                ?>
                

                推薦答案

                試試這個,用你的連接憑據填寫 DB_NAME、DB_USER_NAME 和 DB_USER_PASS 或者使用 $con 變量,如果一切都正確設置為 PDO 對象:

                Try this, fill in DB_NAME, DB_USER_NAME, and DB_USER_PASS with your connection credentials or use the $con variable if everything is set up correctly as a PDO object with it:

                $con = new PDO( 'mysql:host=localhost;dbname=DB_NAME;charset=UTF-8', 'DB_USER_NAME', 'DB_USER_PASS' );
                
                $query = $con->prepare( "SELECT `email` FROM `tbl_name` WHERE `email` = ?" );
                $query->bindValue( 1, $email );
                $query->execute();
                
                if( $query->rowCount() > 0 ) { # If rows are found for query
                     echo "Email found!";
                }
                else {
                     echo "Email not found!";
                }
                

                這篇關于如何檢查郵箱是否已經注冊?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                相關文檔推薦

                Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                PHP PDO ODBC connection(PHP PDO ODBC 連接)
                Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                  <bdo id='XdWr3'></bdo><ul id='XdWr3'></ul>

                    <tbody id='XdWr3'></tbody>
                  <tfoot id='XdWr3'></tfoot>

                      <legend id='XdWr3'><style id='XdWr3'><dir id='XdWr3'><q id='XdWr3'></q></dir></style></legend>
                      • <small id='XdWr3'></small><noframes id='XdWr3'>

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

                          主站蜘蛛池模板: 欧美亚洲国产日韩 | 男女视频免费 | 国产精品免费在线 | 日韩福利| 成人欧美一区二区三区黑人孕妇 | 秋霞电影院午夜伦 | 一区二区三区视频在线观看 | 国产在线观看 | 亚洲精品一区二区三区在线 | 亚洲精品日韩视频 | 成人二区 | 三级在线免费观看 | 夜夜草导航 | 在线a视频网站 | 国产精品无码专区在线观看 | 久草新在线 | 成人在线日韩 | 亚洲国产成人精品女人久久久 | yiren22综合网成人 | 国产成人综合久久 | 欧美综合精品 | 欧美极品在线播放 | 亚洲福利一区二区 | 亚洲综合天堂网 | 嫩草国产 | 久久精品a | 国精产品一品二品国精在线观看 | 91精品国产综合久久久久久 | 国产一级特黄视频 | 免费国产黄网站在线观看视频 | 久久亚洲欧美日韩精品专区 | 91精品久久久久久久久 | 亚洲欧美综合精品久久成人 | 日韩欧美一级精品久久 | 四虎影院美女 | 免费看的黄网站 | 亚洲成人av在线 | 久久精品久久久久久 | 国产久视频 | 亚洲精品99久久久久久 | 欧美一区二区小视频 |