The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 871 - File: showthread.php PHP 7.4.15 (Linux)
File Line Function
/showthread.php 871 errorHandler->error


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
newbie submit form question
Ok, sorry if this is already answered in docs, but I couldn't find explicit examples, and want to make sure I am in the ballpark..

I have a form I have created to submit values to an existing database, but I need these values in separate tables. Can I do this using the $fields array and a sql statement?
example form header:
$fields = ft_api_init_form_page(1);
$params = array(
"submit_button" => "add_intake",
"next_page" => "thanks.php",
"form_data" => $_POST,
// "file_data" => $_FILES,
"finalize" => true

then do my insert into sql based on $fields['field_name']

$qresult = mysql_query("update table where key = $fields['key]");

if (mysql_num_rows($qresult) == 0)

basically, I want to map the fields in the form to an existing database rather than using the formtools ft_ tables..

Would it make more sense to just link the ft_ table to my existing table instead and do some kind of post-processing thing?

Sorry if this is unclear or a stupid question, I am a bit new to this.

would I do this as part of the form itself or could I separate this code?

Messages In This Thread
newbie submit form question - by jguerra - Nov 14th, 2010, 7:50 AM
RE: newbie submit form question - by Ben - Nov 20th, 2010, 10:03 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)