当前位置: 首页>>代码示例>>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;未经允许,请勿转载。