本文整理匯總了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>";