That and you might want to try taking a look around php.net and trying to learn yourself other than asking someone to give you the answer, you'll be better off LEARNING, then you won't have to rely on others for your code
If you learn it yourself, you'll be more flexible - know what to do when you want to modify, reuse your codes, etc, and above all, learning PHP is FUN!
No help from nobody got it on my own.....jeez y would i wanna know something i already know i ve read the books i did the math but i found it and other ppl can use it because its not mine.....just go here http://www.kirupa.com/web/sqlrecords_php2.htm BTW some of its not "FUN"