forked from gitalecu/DIY-Arduino-PID-and-Web-temperature
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.php
More file actions
18 lines (16 loc) · 660 Bytes
/
data.php
File metadata and controls
18 lines (16 loc) · 660 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
$dayz = time();
$aa = (($_GET['Temperature']));
$ab = (($_GET['Setpoint']));
$ac = (($_GET['Input']));
$ad = (($_GET['Kp']));
$ae = (($_GET['Ki']));
$af = (($_GET['Kd']));
$ag = (($_GET['Heater']));
$db="example_data";
$link = mysql_connect('localhost', 'user', 'password');
if (! $link) die(mysql_error());
mysql_select_db($db , $link) or die("Couldn't open $db: ".mysql_error());
$queryResult = mysql_query("INSERT INTO temp (Time, Temp, Setpoint, Input, Kp, Ki, Kd, Heat) VALUES ('$dayz', '$aa', '$ab', '$ac', '$ad', '$ae', '$af', '$ag')");
?>
- See more at: http://fermentationriot.com/arduinopid.php#sthash.3voJRpbo.dpuf