Skip to content

Commit

Permalink
Update CreateTokens.php
Browse files Browse the repository at this point in the history
  • Loading branch information
TomBos authored Mar 27, 2023
1 parent 17242b0 commit 9ae8415
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dbOperations/CreateTokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
$userNameArrayLenght = count($userNameArray);
for ($i = 0; $i < $userNameArrayLenght; $i++){
$token = rand(100000,9999999);
$insertToken = "INSERT INTO `$dataBaseName`.`TokenTable` (`UserName`,`Token`) VALUES ('" . $userNameArray[$i] ."','". $token . "')";
$validatedName = trim($userNameArray[$i]);
$insertToken = "INSERT INTO `$dataBaseName`.`TokenTable` (`UserName`,`Token`) VALUES ('" . $validatedName ."','". $token . "')";
if(mysqli_query($connection, $insertToken)){
$x++;
}
}

print("Inserted " . $x ." users with tokens into Token Table!");
?>
?>

0 comments on commit 9ae8415

Please sign in to comment.