The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
Hooks manager for sending info to another database - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8)
+--- Forum: Modules (https://forums.formtools.org/forumdisplay.php?fid=16)
+--- Thread: Hooks manager for sending info to another database (/showthread.php?tid=30520)



Hooks manager for sending info to another database - goffley3 - Jan 18th, 2018

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
Code:
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, 
          Q01Q02Q03Q04Q05Q06Q07Q08Q09Q10Q11Q12Q13Q14Q15
          NotesEmployeePress
          VALUES($scada_pdo$scada_sql$TypeVal$moldID$last_modified_date$timer_container$q1$q2$q3$q4$q5$q6$q7$q8$q9$q10$q11$q12$q1355$notes$employeeID$machine)";

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

  $conn->close();
}


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