I have a problem creating and passing an array to use to update a table.
A user inputs the number of codes he wants generated ($numcodes). They are generated and listed.
here is the snippet that generates and displays the codes. gstring() is the function that generates the keycodes.
for($i=0;$i<$numcodes;$i++)
{
$keycode=gstring();
print"$keycode<br>";
}
I then pass the keycode on the another function which lists the $numcodes of usernames and passwords. This list is based on $numcodes not on $keycode, so if the user has asked for 5 he gets 5. What I want to do now is write into the table a $keycode, already generated for each username/password.
Hope this explains things clearly enough.
Any help would be greatly appreciated.