Creating the order number

Asked

Viewed 33 times

-1

Good morning !

In a cart system (virtual store), what is the most usual way to create the order number? Remembering that the user does not need to log in.

Look forward to.

  • Describe your scenario in more detail and be more specific.

1 answer

-1


You can create an encrypted key using the functions hash() and microtime():

$codigo=hash('crc32',hash('sha512',microtime()));

It creates a sha512 of microtime() and then a crc32 which is a smaller encryption size, Voce can conclude with a strtoupper() to maintain a capital standard.

In short, you can use creativity to unfold various possibilities for this broad situation.

  • 1

    Thank you Wees Smith.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.