How to send data from ESP8266 to PHP script on website?

Regarding POST vs GET, my first message showed my use of POST, but I changed that following the first reply....
Anyway, since the PHP script works fine from an URL containing the data as well as the file reference, maybe the code could be simplified to only have this:

void SendData(int sensor, float temp, float humid)
{
	HTTPClient http;
	String dataline;
	dataline = "http://www.mydomain.com/php/tempreport.php?source=" + String(sensor, DEC) + "&temp=" + String(temp, DEC) + "&humid=" + String(humid, DEC);
	bool httpResult = http.begin(dataline);
	if (!httpResult)
	{
		SerialDebug.println("Error when sending to server: ");
		SerialDebug.println(dataline);
	}
}

The code builds without errors in any case, but I don't know the innards of a web request so just maybe it will not work in real life?
I see no point in separating the destination and data if they could be sent in one single transaction as a composite URL.
That would be the same as I do in FireFox...