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


PHP Element::setTypeElement方法代碼示例

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


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

示例1: User

        $idUser = $req->fetch();
        $user = new User(0, "", "", "", "", "");
        $_SESSION["user"] = $user->getUserByID($idUser["idUser"]);
        header("Location: /Salon/Canal");
    } else {
        if ($req->rowCount() == 0) {
            $_SESSION["erreur"][] = "Les identifiant données sont invalide.";
            echo "Les identifiant données sont invalide.";
        } else {
            $_SESSION["erreur"][] = "Une erreur est survenu au seins de la base de données.";
            echo "Une erreur est survenu au seins de la base de données.";
        }
    }
    if (isset($_SESSION["erreur"])) {
        header("Location: /Erreur");
    }
}
?>


<?php 
$formConnexion = new Form("Connexion");
$formConnexion->setMethod("POST");
$formConnexion->setAction("/Portail/Connexion");
$pseudo = new Element("login", "Votre pseudo");
$password = new Element("password", "Mot de passe");
$password->setTypeElement("password");
$formConnexion->addElement($pseudo);
$formConnexion->addElement($password);
$formConnexion->submit("Entrez dans le Tchat");
echo $formConnexion->render();
開發者ID:Chortan,項目名稱:Chat,代碼行數:31,代碼來源:Connexion.php

示例2: submit

 public function submit($textSubmit)
 {
     $submit = new Element("send", "Envoyer");
     $submit->setLabel("");
     $submit->setValue($textSubmit);
     $submit->setTypeElement("submit");
     $this->addElement($submit);
 }
開發者ID:Chortan,項目名稱:Chat,代碼行數:8,代碼來源:Form.php

示例3: Form

<?php 
$formInscription = new Form("Inscription");
$formConnexion = new Form("Connexion");
$formInscription->setMethod("POST");
$formConnexion->setMethod("POST");
$formInscription->setAction("/Portail/Inscription");
$formConnexion->setAction("/Portail/Connexion");
$pseudo = new Element("login", "Votre pseudo");
$mail = new Element("mail", "Votre email");
$mail->setTypeElement("email");
$password = new Element("password", "Mot de passe");
$password->setTypeElement("password");
$confirmPassword = new Element("confirmPassword", "Confirmez votre mot de passe");
$confirmPassword->setTypeElement("password");
$formInscription->addElement($pseudo);
$formInscription->addElement($mail);
$formInscription->addElement($password);
$formInscription->addElement($confirmPassword);
$formInscription->submit("Inscription");
$formConnexion->addElement($pseudo);
$formConnexion->addElement($password);
$formConnexion->submit("Entrez dans le Tchat");
echo $formInscription->render();
echo $formConnexion->render();
開發者ID:Chortan,項目名稱:Chat,代碼行數:24,代碼來源:Portail.php

示例4: Element

$formInscription->setAction("/Portail/Inscription");
$pseudo = new Element("pseudo", "Votre pseudo");
$pseudo->requireElement(true);
$mail = new Element("mail", "Votre email");
$mail->setTypeElement("email");
$mail->requireElement(true);
$password = new Element("password", "Mot de passe");
$password->setTypeElement("password");
$password->requireElement(true);
$confirmPassword = new Element("confirmPassword", "Confirmez votre mot de passe");
$confirmPassword->setTypeElement("password");
$confirmPassword->requireElement(true);
$birth = new Element("birth", "Votre date de naissances");
$birth->requireElement(true);
$radioHomme = new Element("sexe", "Homme");
$radioHomme->setTypeElement("radio");
$radioHomme->setName("sexeHomme");
$radioHomme->setClass("sexeRadio");
$radioFemme = new Element("sexe", "Femme");
$radioFemme->setTypeElement("radio");
$radioFemme->setName("sexeFemme");
$radioFemme->setClass("sexeRadio");
$formInscription->addElement($pseudo);
$formInscription->addElement($mail);
$formInscription->addElement($password);
$formInscription->addElement($confirmPassword);
$formInscription->addElement($birth);
$formInscription->addElement($radioFemme);
$formInscription->addElement($radioHomme);
$formInscription->submit("Inscription");
echo $formInscription->render();
開發者ID:Chortan,項目名稱:Chat,代碼行數:31,代碼來源:Inscription.php


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