Jump to content
xisto Community
Sign in to follow this  
Imtay22

How To Make A Random 7 Number Code?

Recommended Posts

I am making a script in php, and for it I need to know how to make a random 7 digit code. I think it has something to do with md5, but i am not sure. Thanks!EDIT- Can someone please change the title to "How to make a random 7 digit code in php?" Thanks!

Edited by Imtay22 (see edit history)

Share this post


Link to post
Share on other sites

It uses the rand function which is basically what makes some random, however I did find a script that could be useful mind you I made some alterations so it will work for seven numbers.

<?phpprint rand() . "<br>";print rand(1000000, 9999999);?>

Basically it will produce a random 7 digit number, mind you this was set up to produce a number between 1 million and 9.9 million. I believe there is another set up that will produce individual numbers instead of one large group.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.