本文整理汇总了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";
示例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>
示例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 {