The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hooks manager for sending info to another database
I'm trying to setup hooks manager to send the data submitted to another database. I want this to grab the values entered and send them all to another database when the form is submitted. Below is the code and I have it set for the
ft_finalize_form, end
hook with a rule priority at 1:

if ($_POST["timer_container"0)
  // Server Vars
  $servername "***.***.***";
  $username "********";
  $password "********";
  $dbname "********";

  // Form Variables
  $TypeVal $_POST["TypeVal"];
  $moldID $_POST["moldID"];
  $last_modified_date $time_stamp;
  $timer_container $_POST["timer_container"];
  $q1 $_POST["q1"];
  $q2 $_POST["q2"];
  $q3 $_POST["q3"];
  $q4 $_POST["q4"];
  $q5 $_POST["q5"];
  $q6 $_POST["q6"];
  $q7 $_POST["q7"];
  $q8 $_POST["q8"];
  $q9 $_POST["q9"];
  $q10 $_POST["q10"];
  $q11 $_POST["q11"];
  $q12 $_POST["q12"];
  $q13 $_POST["q13"];
  $notes $_POST["notes"];
  $employeeID $_POST["employeeID"];
  $machine $_POST["machine"];

  // Create connection
  $conn new mysqli($servername$username$password$dbname);
  // Check connection
  if ($conn->connect_error{
      die("Connection failed: " $conn->connect_error);

  $sql "INSERT INTO moldpm (TypeVal, Machine, Time_Stamp, Elapsed, 

  if ($conn->query($sql=== TRUE{
      echo "New record created successfully";
  else {
      echo "Error: " $sql "<br>" $conn->error;


Can anyone help me out? Not sure if I'm fully understanding the hooks manager.

Forum Jump:

Users browsing this thread: 1 Guest(s)