Page 1 of 1

HTML Number Generator

Posted: Tue Sep 13, 2005 12:52 pm
by nickman013
Hello,

i have a html order form that needs a number generator. for example it generates random 5 digit numbers or letters.

if anyone has any information on how to do this please tell me.

Thanks!

Posted: Tue Sep 13, 2005 1:13 pm
by Burrito
I don't think it can be done with an "HTML" page. HTML pages are 'static' by definition and can not have dynamic information put into them without some kind of server side scripting language....that's where PHP comes into play.

You can generate HTML code with php and inject your random number that way.

something like this should work (for a purley 5 digit random number):

Code: Select all

echo substr(rand(1,100000),0,5);

Posted: Tue Sep 13, 2005 1:30 pm
by nickman013
thank you! :D