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

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 to call to this function to get value.

Note:exists_in_db() is a function.You must write this function after getting parameter and it check in the database and return value.

Tags