This is a late answer, but I'llpost it just in case someone does a search:
The vaiables need to be seperated by an &
so the code should be:
print("&cookie=$cookie");
print("&login_check=$login_check");
print("&user_session=$user_session&");
I find a good idea to both start ans end my url string with an &. That is
loadVariablesNum("somefile.php?&insert=1&banana=yellow&", 0, "POST")
and not loadVariablesNum("somefile.php?insert=1&banana=yellow", 0, "POST")
cheers
-christian