I am trying to create a list that stores the selected elements. The way it goes is that you give the list a name and then you select which elements you want to add to the list. First, I am creating a list with a name. Then the created list gets an auto increment primary key. I need to use listPK primary key to add the elements to the right list. My problem is that I cannot get the value out of $listRes. But if I hard code the value. For instance give $listRes = 1. It work if there is a list with primary key 1. However, I need this to get the primary key value from the recently created list. Therefore I try this: I am trying to create a list that stores the se