How to get iTunes to keep playlist created on iPhone
It sounds like you have 'playlists' ticked in your syncing preferences and that iTunes is overwriting your playlists with no playlists as it syncs from the computer.
First thing to do is to check that Playlists are not being synced under the device in iTunes and Music. Uncheck "sync playlists" and try again.
- Create a new playlist on the iPhone and add some songs to it
- Connect the iPhone to iTunes
- From the Summary tab in iTunes, check the "Manually manage music and videos" then click "Sync"
- The playlist should appear under your iPhone entry in iTunes now
- Now uncheck the "Manually manage music and videos"
- Navigate to the Music tab and check "Sync Music and Entire music library"
- Sync again and the playlist will appear in your iTunes library.
I am not sure whether this is some kind of bug but it worked for me by following the above instructions.
Otherwise iTunes would delete the contents of the iPhone-created playlist upon sync without following the above steps.