ユーザ

This commit is contained in:
2023-07-13 00:49:52 +09:00
parent 976f0c1cd1
commit 71a047573a
2 changed files with 25 additions and 4 deletions
+9 -4
View File
@@ -5,8 +5,13 @@ require_once './db_connection.php';
require_once './modules/user.mod.php';
$user = new User;
$user -> name = $_GET['name'];
$user -> pass = $_GET['pass'];
$user -> insert ();
$chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+-./:;<=>?@[\]^_`~';
$user = new User;
$user -> name = $_GET['name'];
$user -> pass = implode (
array_map (fn () => $chars[rand (0, strlen ($chars) - 1)], range (1, 8)));
echo [$user -> insert () -> id];