0
I have the following code in C++ on Arduino
int variavelemc;
variavelemc = 10;
And I have the following code in PHP
$variavelemphp = $_POST['variavelemc'];
How do I pass the variavelemc
to the $variavelemphp
?
Additional Information
Arduino is connected to Internet.
The PHP code is hosted on the internet.
It depends. This PHP is being served by a web server, I suppose, so you have to send an Arduino HTTP request to your web server. You could run PHP via command line and do serial communication.
– Woss
Given the issue that PHP is hosted and Arduino connected to the internet, there are libraries HTTP client that you can use to make a request.
– Woss
Is it feasible to implement Mysql (save the data in a database) directly in Arduino? Or you necessarily need parameters sent to be treated in a PHP script?
– Darlei Fernando Zillmer
@Darleifernandozillmer would need to be in PHP, since direct connection to Mysql is not provided.
– Renato Junior