"Should the passwords be generated on the fly, one at a time as needed, or should they be
stored in a database and assigned as needed? If so, is there a way to indicate that a
certain combination has already been assigned,
so as not to assign the same combination to more than one person?"
Well keeping them stored until needed is just taking up space, as for assigning the same its rather unliklely, anyways, a simple check by selecting * from "password" and seeing if its the same will solve that.
Now, if you want Credit Card details you want them right away, and you'll have to make sure the whole setup is VERY secure.
Personally, what I'd do is once they signed up, send them an automatic mail (more below)
with a automatically generated password in it, when they sign up you can use a file to generate a password, add it to the database along with the other details, and then mail it out to them.
Once you have a form setup its really easy, say you have the value $users_email, well, once its submitted you generate a random password into the variable $password, and then put all other details, $name, $address, etc... (I'm no expert of how to run a highly secure site) into the database and then mail the person using $users_email and include $password in the auto message...
Thank you for blah blah blah.
Your password is <?php echo "$password"; ?> and you are free to blah blah blah.
I don't know how much you go, but heres a very rough idea of the mail system, cause I need to catch my 6 hours sleep (after 4 last night)
mail("$recipient", "$subject",
"$message",
"From: $sender\nReply-To: $sender");
Hope that helps somewhat, reply asking more and I'll answer what I can asap.
Other people probably, definately, know more about this than me so I expect one of them will be able to help as well.