The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
Error #302 - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Error #302 (/showthread.php?tid=160) |
Error #302 - bwaye - May 20th, 2009 IS THIS A BUG. The problem seems to be that the after one submission I get error#302. Is this a finalize ERROR or BUG. It seems everything is set correctly. If I reset the browser everything works (MOSTLY). I assume the following is not working correctly: Error Type: User Error Code: #302 PAGE: http://downtownchattanooga.org/nightfall <?php require_once("/home/XXXXX/public_html/data/global/api/api.php"); $fields = ft_api_init_form_page(); ft_api_clear_form_sessions(); ?> <?php require_once("/home/XXXXX/public_html/data/global/api/api.php"); $fields = ft_api_init_form_page(1); $params = array( "submit_button" => "submit", "next_page" => "http://downtownchattanooga.org/nightfall/auction/thanks.php", "form_data" => $_POST, "finalize" => true ); ft_api_process_form($params); ?> RE: Error #302 - Ben - May 21st, 2009 Hey bwaye! It sounds like the last page of your form (the "thankyou" page) is missing the ft_api_clear_form_sessions() function call. That empties sessions so that the next time your return to the form a new submission ID is created. Check out this page: http://docs.formtools.org/tutorials/api_single_page_form/?page=step2 If your form DOES have that line, then it sounds like you're running a multi-page form and you're finalizing the submission on the first page. By default the ft_api_process_form function only updates non-finalized submissions. - Ben RE: Error #302 - bwaye - May 22nd, 2009 Ben, This is what fixed the isssue. <?php require_once("/home/XXXXX/public_html/data/global/api/api.php"); $fields = ft_api_init_form_page(1); $params = array( "submit_button" => "submit", "next_page" => "http://downtownchattanooga.org/nightfall/auction/thanks.php", "form_data" => $_POST, "finalize" => true ); ft_api_process_form($params); ?> <?php require_once("/home/XXXXX/public_html/data/global/api/api.php"); $fields = ft_api_init_form_page(1); $params = array( "submit_button" => "submit", "next_page" => "thanks.php", "form_data" => $_POST, "finalize" => true ); ft_api_process_form($params); ?> RE: Error #302 - Ben - May 23rd, 2009 Huh. Was the next page in a different folder as the current page? If it was in the same folder, it really shouldn't have made a difference - odd! But I'm glad it's been resolved. - Ben |