The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (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.31 (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.31 (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.31 (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.31 (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.31 (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 1 - Line: 1415 - File: inc/functions.php PHP 8.1.31 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
need help with API form over writing previous submission in database? - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17)
+--- Thread: need help with API form over writing previous submission in database? (/showthread.php?tid=2709)



need help with API form over writing previous submission in database? - dattuso - Oct 9th, 2013

I have set up my very first API form it is a single API form.
I was able to set it up so that it is "live" and hitting the database, however after the initial submission every subsequent submission over writes the previous submission. The php code for my Submission Form page is:

<?php
require_once("../formtools/global/api/api.php");
$fields = ft_api_init_form_page(17);
$params = array(
"submit_button" => "nomination",
"next_page" => "nomination_thankyou.php",
"form_data" => $_POST,
"file_data" => $_FILES,
"finalize" => true
);
ft_api_process_form($params);
?>

The Form action:
<form action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST" enctype="multipart/form-data" />
<input type="hidden" name="nominationform" value="" />

My Submit button:
<input type="submit" value="Submit" name="nomination"/>

I tried 2 configurations for the code for my "Thank You" page:

1)
<?php
require_once("../formtools/global/api/api.php");
$fields = ft_api_init_form_page(17);
ft_api_clear_form_sessions(nominationform);
?>

and 2)
<?php
require_once("../formtools/global/api/api.php");
ft_api_clear_form_sessions(nominationform);
$fields = ft_api_init_form_page(17);
?>

The form submits fine but it over writes the same record in the database and will not advance to the next record.

Any help would be gratefully received.

Thanks Diana