當前位置: 首頁>>代碼示例>>PHP>>正文


PHP connection::usernamefetchrow方法代碼示例

本文整理匯總了PHP中connection::usernamefetchrow方法的典型用法代碼示例。如果您正苦於以下問題:PHP connection::usernamefetchrow方法的具體用法?PHP connection::usernamefetchrow怎麽用?PHP connection::usernamefetchrow使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在connection的用法示例。


在下文中一共展示了connection::usernamefetchrow方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: trim

 /* Creating session */
 $_SESSION["username"] = $_POST["username"];
 $_SESSION["pswd"] = $_POST["pswd"];
 $username = trim($_SESSION["username"]);
 $password = trim($_SESSION["pswd"]);
 /* 	if (isset($_POST['remember']))
      {
      $value = 'something from somewhere';
      setcookie("TestCookie", $value);
      echo $_COOKIE["TestCookie"];
      }
     */
 /* $sql = "SELECT emailaddress,password, firstname, lastname from accounts where emailaddress='$username'";
    $result=mysql_query( $sql, $connect);
    $row = mysql_fetch_row($result); */
 $row = $obj->usernamefetchrow($username);
 $flagcaptcha = 0;
 if ($tempvalue == $_POST["captcha"]) {
     $flagcaptcha = 9;
     $_SESSION['my_captcha'] = $tempvalue;
 }
 $flag = 1;
 if ($row[0]) {
     $flag = 10;
 }
 if ($flag > 3 && $flagcaptcha > 3) {
     if ($row[1] == md5($password) && $row[0] == $username) {
         $_SESSION["fname"] = $row[2];
         $_SESSION["lname"] = $row[3];
         if (isset($_POST['remember'])) {
             $cookie_name = "cookieusername";
開發者ID:priyak0523,項目名稱:PHPLoginPage,代碼行數:31,代碼來源:index.php

示例2: header

 if (isset($_SESSION["username"]) and !isset($_POST["emailforget"])) {
     $mailvalue = $_SESSION["username"];
 } else {
     if (isset($_POST["emailforget"])) {
         $mailvalue = $_POST["emailforget"];
         $_SESSION["username"] = $_POST["emailforget"];
     } else {
         $mailvalue = "";
     }
 }
 $mailvalue = $_POST["emailforget"];
 $_SESSION["username"] = $_POST["emailforget"];
 /* $sql = "SELECT emailaddress from accounts where emailaddress='$mailvalue'";
    $result=mysql_query( $sql, $connect);
    $row = mysql_fetch_row($result); */
 $row = $obj->usernamefetchrow($mailvalue);
 $flag = 1;
 if ($row[0]) {
     $flag = 10;
 }
 if ($flag > 3) {
     header('Location: hint1.php');
 } else {
     ?>
                                             <div>
                                                 <label>
                                                     <?php 
     echo "*Username not found. Seems like you haven't registered!!!!";
     ?>
                                                 </label>
                                             </div>
開發者ID:kk5323,項目名稱:PHPLoginPage,代碼行數:31,代碼來源:hint.php

示例3: VALUES

             $valuefalg = 1;
         } else {
             if (!preg_match('`[0-9]`', $password)) {
                 $valuefalg = 1;
             } else {
                 if (!preg_match('`[@#$%]`', $password)) {
                     $valuefalg = 1;
                 }
             }
         }
     }
 }
 /* $sql = "SELECT emailaddress,password from accounts where emailaddress='$value1'";
    $result=mysql_query( $sql, $connect);
    $row = mysql_fetch_row($result); */
 $row = $obj->usernamefetchrow($value1);
 $flag = 1;
 if ($row[0]) {
     $flag = 10;
 }
 if ($value4 == $value5 && $flag < 5 && $value1 == $valuemail && $valuefalg > 5) {
     $value44 = md5($value4);
     /* $sql = "INSERT INTO accounts (emailaddress, firstname , lastname , password , Hint , hintAnswer)
                                                   VALUES ('$value1','$value2','$value3','$value44','$value6','$value7')";
     
                                                   if (mysql_query( $sql, $connect )===true ) */
     $result = $obj->sqlConnect($value1, $value2, $value3, $value44, $value6, $value7);
     if ($result === true) {
         //echo "attendees values inserted successfully<br>";
         header('Location: print.php');
     } else {
開發者ID:kk5323,項目名稱:PHPLoginPage,代碼行數:31,代碼來源:registration.php


注:本文中的connection::usernamefetchrow方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。