Porkie Posted May 6, 2009 Share Posted May 6, 2009 i want my form to create a random number and email it to the client when the form is submitted. this number would allow my client to refer to it later. That number would have to be added to my database.How could i do this? Quote Link to comment https://forums.phpfreaks.com/topic/157117-random-number/ Share on other sites More sharing options...
premiso Posted May 6, 2009 Share Posted May 6, 2009 Why not use an md5 or an sha1 hash. Or use an id field that is auto_incremented in the DB and use that auto_incremented ID value to refer to it. Quote Link to comment https://forums.phpfreaks.com/topic/157117-random-number/#findComment-827771 Share on other sites More sharing options...
Ken2k7 Posted May 6, 2009 Share Posted May 6, 2009 rand Quote Link to comment https://forums.phpfreaks.com/topic/157117-random-number/#findComment-827775 Share on other sites More sharing options...
Porkie Posted May 6, 2009 Author Share Posted May 6, 2009 so in my form i would put something like ? Unique Band Identification Number - <?php rand (22000,99000) ?> </label></td> i now need to make this a figure that i can add to my database. How can i do this? Cheers Quote Link to comment https://forums.phpfreaks.com/topic/157117-random-number/#findComment-827785 Share on other sites More sharing options...
Porkie Posted May 6, 2009 Author Share Posted May 6, 2009 any help here please? Quote Link to comment https://forums.phpfreaks.com/topic/157117-random-number/#findComment-827848 Share on other sites More sharing options...
Ken2k7 Posted May 6, 2009 Share Posted May 6, 2009 You run an INSERT SQL query. Quote Link to comment https://forums.phpfreaks.com/topic/157117-random-number/#findComment-827850 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.