If your "ID" is a primary key, that means it is already unique.
If you make that an "auto increment" field the database will insert a new unique value for every record you insert into your database.
Then you can use the php function mysql_insert_id to get the ID of the last inserted record.
Note: this is the last inserted record for the connection that you are using.
If you are using several connections for multiple users, you will still get the ID of the last inserted record for_each_user, and not just the last record that was inserted into the database.