本文整理匯總了PHP中UserDao::searchMatching方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserDao::searchMatching方法的具體用法?PHP UserDao::searchMatching怎麽用?PHP UserDao::searchMatching使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UserDao
的用法示例。
在下文中一共展示了UserDao::searchMatching方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Datasource
<?php
include_once "../models/Datasource.php";
include_once "../models/UserDao.php";
include_once "../models/User.php";
include_once "../models/Variables.php";
$conn = new Datasource($dbhost, $dbName, $dbUser, $dbPassword);
$adao = new UserDao();
$username = $_POST["username"];
$password = $_POST["pass"];
$abusqueda = new User();
$abusqueda->setUser($username);
$list = $adao->searchMatching($conn, $abusqueda);
if (count($list) == 0) {
?>
<script type="text/javascript">
alert("No existe este usuario");
</script>
<Meta http-equiv="refresh" content="0,url=../sesion.php">
<?php
} else {
$aobtenido = $list[0];
if ($password != $aobtenido->getPass()) {
?>
<script type="text/javascript">
alert("Contrase\u00F1a incorrecta");
</script>
<Meta http-equiv="refresh" content="0,url=../sesion.php">
<?php
} else {
?>