本文整理汇总了PHP中model::login方法的典型用法代码示例。如果您正苦于以下问题:PHP model::login方法的具体用法?PHP model::login怎么用?PHP model::login使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类model
的用法示例。
在下文中一共展示了model::login方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$datos = array();
$query = $this->mysqli->query("SELECT id_frase, frase_esp, frase_tzo FROM frases WHERE tipo_frase='{$tipo_frase}' AND areas_id_area = '{$id_area}' AND frases_id_frase = '{$id_frase}' ");
//$query = $this->mysqli->query("SELECT id_frase, frase_esp, frase_tzo FROM frases");
echo "<option title = 'Elija una opción'>Elija una opción</option>";
while ($row = $query->fetch_array()) {
echo "<option value=" . $row['id_frase'] . ">";
echo utf8_encode($row['frase_esp']);
echo "</option>";
//$datos[]=array("id_area"=>$row["id_area"], "area"=>utf8_encode($row["area"]));
}
}
}
//Para ver si jala XD
$instance = new model();
if ($_POST['tipo'] == "login") {
$instance->login();
} else {
if ($_POST['tipo'] == "preguntas_p") {
$instance->preguntas_p();
} else {
if ($_POST['tipo'] == "listar_areas") {
$instance->listar_areas();
} else {
if ($_POST['tipo'] == "listar_usuarios") {
$instance->listar_usuarios();
} else {
if ($_POST['tipo'] == "listar_frases") {
$instance->listar_frases();
} else {
if ($_POST['tipo'] == "listar_frasesM") {
$instance->listar_frasesM();
示例2: model
<?php
include "model.php";
$model = new model();
$username = $model->security($_POST['username']);
$password = $model->security($_POST['password']);
$result = $model->login($username, $password);
if ($result == "success") {
session_start();
$_SESSION['username'] = $username;
$_SESSION['password'] = $password;
}
echo $result;