Error CS0119 but new keyword was used

I’m connecting to my database with this:

IEnumerator ValidateLogin() {
		WWWForm form = new WWWForm();
		form.AddField( "myform_user", formUser );
		form.AddField( "myform_pass", formPassword );
		//error is here
		WWW www = new WWW(URL, form);
		yield return www;
		if (www.error != null) {
			print(www.error);
		} else {
			print("Test ok");
			formText = www.data;
			www.Dispose();
		}
	}

I’m getting the error: CS0119: Expression denotes a ‘type’, where a ‘variable’, ‘value’ or ‘method group’ was expected

On the line: WWW www = new WWW(URL, form);

I haven’t done a lot of c# or unity web connectivity, and I’d appreciate the help. All of the other solutions I’ve found are because the programmer was missing the “new” keyword.

Pretty sure it’s complaining about URL, not WWW. Try replacing URL with a literal string (or string variable) that is the URL to post the form to. Unless URL is the name of a string variable in all caps, in that case you should use lower case instead.