本文整理汇总了PHP中BD::addUser方法的典型用法代码示例。如果您正苦于以下问题:PHP BD::addUser方法的具体用法?PHP BD::addUser怎么用?PHP BD::addUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BD
的用法示例。
在下文中一共展示了BD::addUser方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addUser
function addUser($Pseudo, $Nom, $Prenom, $Sexe, $Mail, $Pass)
{
$BD = new BD('user');
$BD->addUser($Pseudo, $Nom, $Prenom, $Sexe, $Mail, $Pass);
$BD->update("rang", 0, "pseudo", $Pseudo);
$token = uniqid(rand(), true);
$token = sha1($token);
$BD->update("token", $token, "pseudo", $Pseudo);
$info = "Pseudo : " . $Pseudo . "\n" . "Pour valider votre compte cliquer ici : ";
$link = "http://www.holobox.fr/AFK/index.php?page=inscription&pseudo=" . $Pseudo . "&tok=" . $token;
mail($Mail, "AFK : Validation de votre compte !", $info . $link);
}
示例2: inscrit
function inscrit($Nom, $Prenom, $Age, $Sexe, $Pass, $Tel, $Mail, $Permis)
{
$BD = new BD("user");
$BD->addUser($Nom, $Prenom, $Age, $Sexe, $Pass, $Tel, $Mail, $Permis);
$BD->update("banni", 1, "mail", $Mail);
$token = uniqid(rand(), true);
$token = sha1($token);
$BD->update("tokens", $token, "mail", $Mail);
$BD->update("avatar", "avatar/default.png", "mail", $Mail);
$link = "http://62.210.110.24/S2go/dev/login.php?mail=" . $Mail . "&tok=" . $token;
$mail = new mail($Mail, "Share2go : Validation de votre compte !", "Reservation", $link);
}
示例3: json_encode
<?php
ini_set('error_reporting', E_ALL);
ini_set('display_errors', 1);
require_once '../Config.class.php';
require_once '../Bd.class.php';
header('Cache-Control: no-cache, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Content-type: application/json');
extract($_GET);
$BD = new BD('user');
$BD->addUser($pseudo, $email, $password);
echo json_encode("Sign");
示例4:
/* Test Fonction Select */
echo "<h2>Test Fonction Select </h2></br>";
$donnes = $BD->select("iduser", 1);
print_r($donnes);
echo "</br>";
/* Test Fonction Select */
echo "<h2>Test Fonction SelectAll </h2></br>";
$donnees = $BD->selectAll();
foreach ($donnees as $value) {
print_r($value);
echo "</br>";
echo "{$value->nom}";
echo "</br>";
}
/* Test Fonction addUser */
$BD->addUser("Jean", "test", 20, "homme", "testpass", 0750, "sebspas@legitan.com");
echo "<h2>Test Fonction addUser </h2></br>";
$donnees = $BD->selectAll();
foreach ($donnees as $value) {
print_r($value);
echo "</br>";
}
/* Test update */
$BD->update("nom", "Jeanne", "nom", "Jean");
echo "<h2>Test Fonction UPDATE </h2></br>";
$donnees = $BD->selectAll();
foreach ($donnees as $value) {
print_r($value);
echo "</br>";
echo "{$value->nom}";
echo "</br>";