WebGl build with WWW POST data is blank on the server

My unity game uses a WWW to POST data to a PHP server. When I run the game from the editor, all is fine. However, when I run the WebGL build, my server is getting blank data. Why? I’m using Unity 5.1.2f1.

Dictionary header = new Dictionary(); 
header.Add("Access-Control-Allow-Credentials", "true"); 
header.Add("Access-Control-Allow-Headers", "Accept"); 
header.Add("Access-Control-Allow-Methods", "POST"); 
header.Add("Access-Control-Allow-Origin", "*");

WWW www = new WWW(_serverURL, data, header);
WWWForm form = new WWWForm();
form.headers.Add("Access-Control-Allow-Credentials", "true"); 
form.headers.Add("Access-Control-Allow-Headers", "X-Requested-With"); 
form.headers.Add("Access-Control-Allow-Headers", "Content-Type"); 
form.headers.Add("Access-Control-Allow-Methods", "POST"); 
form.headers.Add("Access-Control-Allow-Origin", "*");
form.AddBinaryData("data", data);`

WWW www = new WWW(_serverURL, form);

Any ideas?

Add the form.headers to your header first and you should be good to go:

WWWForm form = new WWWForm();
form.AddField("name", playerName);

Dictionary header = new Dictionary();
    
header = form.headers;
    
header.Add("Access-Control-Allow-Credentials", "true"); 
header.Add("Access-Control-Allow-Headers", "Accept"); 
header.Add("Access-Control-Allow-Methods", "POST"); 
header.Add("Access-Control-Allow-Origin", "*");
    
WWW www = new WWW(_serverURL, form.data, header);

http://forum.unity3d.com/threads/webgl-and-mysql.376556/#post-2442675