Send data to SQL Database

Hello Community

I really need some help. I have a Arduino set up that read temperature from the classroom. It prints it to the LCD display on the Arduino board.

I have followed some tutorials from google searching but cannot find any solutions

I have this file already uploaded to my website and have attached it to this post. In addition I have also added my Arduino code which prints data to LCD display

How can I send the data to the DB using just the WiFi Shield and not ethernet as I do not have the Ethernet components

PHP file that is stored on my Website

<?php // Prepare variables for database connection $dbusername = "MyDBName"; // enter database username, I used "arduino" in step 2.2 $dbpassword = "MyPassword"; // enter database password, I used "arduinotest" in step 2.2 $server = "MyServer"; // IMPORTANT: if you are using XAMPP enter "localhost", but if you have an online website enter its address, ie."www.yourwebsite.com" // Connect to your database $dbconnect = mysql_pconnect($server, $dbusername, $dbpassword); $dbselect = mysql_select_db("SMK23080_webdevelopme",$dbconnect); // Prepare the SQL statement $sql = "INSERT INTO temperature (m_id, m_admin, temperature, m_time) VALUES ('".$_GET["m_id"]."',, '".$_GET["m_admin"]."', '".$_GET["temperature"]."', '".$_GET["m_time"]."')"; // Execute SQL statement mysql_query($sql); ?>

Thanks guys very much

arduionCode.txt (3.36 KB)

PHP file that is stored on my Website

It might be stored on your web SERVER. It is not stored on your web SITE.

How can I send the data to the DB using just the WiFi Shield and not ethernet as I do not have the Ethernet components

You make a GET request. The fact that you have a WiFi shield, instead of an Ethernet shield, is irrelevant. How the data gets to the router (wirelessly or over a CAT5 cable) makes no difference.

But before you event start on the Arduino side, first check that you are able to upload data to your webserver by issuing a command of the following example format in a web browser of a PC (or other device) which has network connectivity to your web server:

http://192.168.1.99/sample.php?m_id=23&m_admin=34&temperature=45&m_time=56

or maybe on the server it self, if that is available to you.
Then you are sure of your php/mySql configuration and you've got some basis for your http GET statement.

Incidentally, your SQL query seems to have two consecutive comma characters in it.