Hi Aleem, > // get the last ID from above query: > $query="SELECT * FROM firstTable ORDER BY id DESC LIMIT 1"; PHP provides a function for exactly this situation: http://php.net/mysql-insert-id HTH Jon