Hello everyone i want to make a random number generator and also to check the numbers, and if that number exist in the database than to generate other number... thank you :)
Stefce
146
Posting Pro
Recommended Answers
Jump to PostPawned from codeigniter:
function random_string($type = 'alnum', $len = 8) { switch($type) { case 'basic' : return mt_rand(); break; case 'alnum' : case 'numeric' : case 'nozero' : case 'alpha' : switch ($type) { case 'alpha' : $pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; break; case 'alnum' : $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.