PHP check a random string if it exists and create a new one

How to create random string and check if it exists form database , if it does create a new one using php.You can use php time() function to create random string and convert it using md5() function.

  How…