In php you need to add square brackets to the list name in your html before it will work with multiselect.
So <select name="myname"> needs to be updated to <select name="myname[]">
It appears the code is correct, so the problem has to be in the way the form element is named.