Advertisement
Guest User

Untitled

a guest
Aug 19th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. <?php
  2. // Connect to MySQL
  3. $dbhost = "localhost";
  4. $dbname = "arduino_test";
  5. $dbusername = "root";
  6. $dbpassword = "#######";
  7.  
  8. $link = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbusername,$dbpassword);
  9.  
  10. $query = $link->prepare('UPDATE Analog_in SET Analog_Input_Value = :analog_input_value WHERE Analog_Input = :analog_input');
  11.  
  12. $analog_input = $_GET['AnalogInput'];
  13. $analog_input_value = $_GET['AnalogInputValue'];
  14.  
  15. $query->execute(["analog_input_value" => $analog_input_value,"analog_input" => $analog_input]);
  16.  
  17. // Go to the review_data.php
  18. header("Location: review_data.php");
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement