11-22-2008, 05:28 AM
|
#8 (permalink)
|
|
The Frequenter
Join Date: Sep 2007
Location: Denmark
Posts: 352
Thanks: 8
|
You're using rand incorrectly:
PHP Code:
$makeSelection = rand("1234567890qwertyuiopasdfghjklzxcvbnm");
Use something like:
PHP Code:
static $makeSelection, $makeSelection_len;
if(!$makeSelection)
{
$makeSelection = array_merge(range(0, 9), range('a', 'z'));
$makeSelection_len = sizeof($makeSelection);
}
/* ... */
$makeSelection = rand(0, $makeSelection_len - 1);
/* ... */
ps. Remember to seed rand!
Also I don't see the point of calling session_start() inside the function?
:)
__________________
|
|
|