Thank you for the compliment.
Just happy to help where I can 😊
are u the same guy who have books
No, that is not me haha ... nice find though!
That guy just has the same name, but seems very experienced with art (Van Gogh).
As for the email: every email my server sends to you (notification that there is a new post on your forum topic for example) is returned since your mailbox seems full.
Personally it doesn't bother me, but you may be missing the notifications, and if you ever want to change something on your account (like your password), you may not be able to complete these tasks since emails never arrive. 😉
Coming back to your code ...
So this link actually uses the GET method.
http://example.com/esp-outputs.php?name=touchless&board=3&gpio=5&state=0
Where as this line is intended for the POST method.
String httpRequestData = "{\"name\":\"touchless\",\"board\":\"3\",\"gpio\":\"5\",\"state\":\"0\"}";
You should not mix these method, since that can be confusing and may not work as expected.
GET and POST are 2 different methods for transferring data from a browser (or in this case your ESP8266) to your server.
I know the names are a little confusing, I didn't make them up haha, but in essence they do the same thing, just in a different way.
Presuming we continue with the GET method ... so for now we drop everything JSON or POST related.
If you look at the link:
http://example.com/ esp-outputs.php?name=touchless&board=3&gpio=5&state=0
then you'll see that after the page you're trying to open (esp-outputs.php), there will be a question mark (?), followed by a variable name = value (touchless).
After that you will see the ampersand symbol (&) which indicates that another variable+value will follow (board=3).
Then again an ampersand (&), indicating that yet another variable+value follows (gpi=5).
Then again an ampersand (&), indicating that yet another variable+value follows (state=0).
Now if you want to add a variable, for example let's call it "switch", with a value either "0" (off) of "1" (on) then you can add this like so.
First add an ampersand indicating that a variable+value will follow, then the variable name followed by the equal sign (=) and finally followed by the value (0 or 1):
http://example.com/esp-outputs.php?name=touchless&board=3&gpio=5&state=0 &switch=1
Naturally, you will need to adjust your PHP code to actually read "switch" ($_GET["switch"]) and do something with it.
I think there are a few things you may want to look at.
Your code is a little bit of a mess, which I fully understand since you were struggling with POST vs GET and JSON.
I'd strongly recommend starting with a simple example, as seen in this paragraph of the link I gave you earlier.
Naturally, you'll need to have the PHP code on your server for that to work with it as well of course.
A few pointers:
1) Your URL definition already includes GET parameters. This doesn't need to be wrong, but a little unusual.
These GET parameters are usually added in code based on the values you'd like to send. You'll see that in this paragraph as well, where the add the parameters to the main link.
//Your IP address or domain name with URL path
const char* serverName = "http://example.com/esp-outputs-action.php?action=outputs_state&board=1";
2) Your code is mixing up the POST and GET methods. Better stick to one - the GET method is the easiest to begin with, and will not require any JSON complications.