Tagged: php


A simple random string generator in PHP

A random string generator is useful for all php projects. You may use it to create tokens or to create new random password. The generateString function generates a new random string $length characters long....


How to get the last inserted ID in a MySQL database using PHP

If you perform an insert into a mysql database table containing an AUTO_INCREMENT field, you can retrive the ID of the last inserted record without execute any query. Let’s start with an example. In...