How to generate alphanumeric OTP in PHP
<?php
/* This function will return a random */
/* string of specified length */
function random_strings($length_of_string)
{
/* String of all alphanumeric character */
$str_result = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
/* Shufle the $str_result and returns substring */
/* of specified length */
return substr(str_shuffle($str_result),
0, $length_of_string);
}
echo random_strings(6);
Warning: mysqli_connect(): (HY000/1040): Too many connections in
/www/wwwroot/studentstutorial.com/demo/conn/conn.php on line
15
Could not Connect My Sql:Too many connections