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? 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. 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 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 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? 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. Link to comment https://forums.phpfreaks.com/topic/157117-random-number/#findComment-827850 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.