Yeah, your unique ids would be an auto-index. The following is the pseudo schema I usually use, but much more complicated than that. The links have relations. Whatever suits your needs...
tblUser {user_id, user_name, user_blabla}
tblProduct {product_id, product_name, product_price, product_blabla}
tblOrder {order_id, user_id, product_id_delimited, product_count_delimited, order_datetime, order_blabla}
Create your tables like the above and use your user id as a session cookie or whatever you want, then you can perform more queries to get the rest of the info so that you can insert an order record.