The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
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 |