Walrus
Walrus

Reputation: 20444

PHP random unique identifier

In the construction of our booking system client can view their bookings online. At the moment the URL of their page is created as a sequential number. So /booking1, /booking2, /booking3 etc...

I'd rather have unique name a bit like the JSFiddle way of doing it. A series of letters and numbers.

Is that possible?

Upvotes: 0

Views: 440

Answers (3)

Abdelkader Soudani
Abdelkader Soudani

Reputation: 482

you can use uniqid("bookingr", false);

Upvotes: 0

Jean-Marc Pelletier
Jean-Marc Pelletier

Reputation: 1372

Would uniqid be good enough for what you need?

http://php.net/manual/en/function.uniqid.php

Upvotes: 3

yent
yent

Reputation: 1343

uniqid function seems to be what you are looking for.

Upvotes: 0

Related Questions