Advertisement
MizunoBrasil

Javascript 02

Jan 27th, 2023 (edited)
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  1. <?php
  2.   $data = $_POST['hiddenOutput'];
  3.   // Connect to the database
  4.   $conn = mysqli_connect("servidor", "usuario", "senha", "base_de_dados");
  5.   // Insert data into the database
  6.   $query = mysqli_query($conn, "INSERT INTO media (data) VALUES ('$data')");
  7.   // check for error
  8.   if(!$query){
  9.     echo "Error: ". mysqli_error($conn);
  10.   }
  11.   // Close the connection
  12.   mysqli_close($conn);
  13. ?>
  14.  
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement