strtok() trap
next = strtok(mystring,"&");
Don't expect, that mystring has the same content as before. It will only have the same content if your string couldn't be tokenized. But if there was another token found in this string, mystring will now have a 0 after the first occurance.
So it's better to make a copy of the string (for example with strcpy() or strdup()) and let strtok() operate on this string instead of mystring.
