assign every product an unique product id. this can be done by an auto increment value in the primary table, then use mysql_insert_id() to get the product id. thereafter use the unique product id to refer to the product (in the database tables) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php