Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Prepare variables for database connection
- $dbusername = "root"; // enter database username, I used "arduino" in step 2.2
- $dbpassword = "sohan"; // enter database password, I used "arduinotest" in step 2.2
- $server = "localhost"; // 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("mp_data",$dbconnect);
- // Prepare the SQL statement
- $sql = "INSERT INTO mp_data (flow_rate1) VALUES ('".$_GET["value"]."')";
- // Execute SQL statement
- mysql_query($sql);
- ?>
Add Comment
Please, Sign In to add comment