php - Symfony2 unique token generator -


i'm developing website , need way create token when form submitted mysql, needs unique, id column.

for example, when submit form, inserts db form data plus token = txxxxxx or whatever, actually, format depend on stuff, think can handle myself, need way create unique token inside db...

does knows way so?

i've tried generate random php function generate number, check against mysql, if number exists, generate 1 until got non-used one, submit... slow, , not best way...

maybe can use uniqid(), generate unique id


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -