Generate a quote number?
Posted: Fri Apr 21, 2006 12:41 pm
Guys,
What do you think the best way would be to generate a quote so that there are no duplicates, and the number is not too long ( i already started using the session number )?
Right now it is currently session, but in the past (In ASP) I used
<%
DIM QUOTENUM
QUOTENUM = CLng(Now * Now)
%>
#<%=QUOTENUM%>
So it takes the Date/Time multiplied by the Date/Time, then converts it to an easy to use number.
So I would never get a duplicate, because as the seconds change, so did the number.
Is there some code in PHP that would do the same thing?
Or even something better I am unaware of?
Any help is greatly appreciated.
Thanks.
What do you think the best way would be to generate a quote so that there are no duplicates, and the number is not too long ( i already started using the session number )?
Right now it is currently session, but in the past (In ASP) I used
<%
DIM QUOTENUM
QUOTENUM = CLng(Now * Now)
%>
#<%=QUOTENUM%>
So it takes the Date/Time multiplied by the Date/Time, then converts it to an easy to use number.
So I would never get a duplicate, because as the seconds change, so did the number.
Is there some code in PHP that would do the same thing?
Or even something better I am unaware of?
Any help is greatly appreciated.
Thanks.