random id numbers
Posted: Thu Aug 31, 2006 7:37 am
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
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?
thx mjay
Code: Select all
function resetDynamicFields()
{
document.placeform.OrderId.value=Math.round(Math.random()*10000000000);
}edit: is there away to do this without javascript?
thx mjay