PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am building a large website in php which as many forms to fill in and i need to set a id number field that is unique for each form if i use this code
function resetDynamicFields()
{
document.placeform.OrderId.value=Math.round(Math.random()*10000000000);
}
what is the chances of me getting to of the same numbers coming up. Even if its one in a million i can't take them chances as it would be getting a very lot of traffic
edit: is there away to do this without javascript?
Thanks CoderGoblin that should do the trick. i needed a unique id for each form as there are around 6 pages long so once the first page is submitted i need away of tracking the record inputted for the next pages. Having a unique id seems like the easyest way as long as the id is unique and not gonna be repeated.