Random numbers and database

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!

Moderator: General Moderators

Post Reply
nig
Forum Newbie
Posts: 2
Joined: Fri Jul 28, 2006 4:49 am

Random numbers and database

Post by nig »

I am sorry for posting a dum question

I am trying to set up a PHP script that will get 6 random numbers (making sure all 6 are not the same)

And search a database for the numbers.

I am sorry to ask this but I do ASP script and want to learn PHP and understand it.

And I am not sure where to start

Thanks
choppsta
Forum Contributor
Posts: 114
Joined: Thu Jul 03, 2003 11:11 am

Post by choppsta »

Try using the rand() function:
http://uk.php.net/manual/en/function.rand.php
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

nig
Forum Newbie
Posts: 2
Joined: Fri Jul 28, 2006 4:49 am

Post by nig »

Pimptastic wrote:This any help?

viewtopic.php?t=51996&highlight=random
It works thank you very much

Just go it to show the numbers or even get a datbase to search from them


But thet is cool thanka gain
Post Reply