The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Using API - redirect to thanyou page fail - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: Installation (https://forums.formtools.org/forumdisplay.php?fid=4) +--- Thread: Using API - redirect to thanyou page fail (/showthread.php?tid=2221) |
Using API - redirect to thanyou page fail - scorpio84 - Oct 8th, 2012 Just do not know why is this happening as same thing worked on my local AFter installation if I submit my form I am being taken to index.php (which is shown as blank) rather than 'thanks.php'. Thanks.php do exist. Also when it is redirecte back for some strange reason favicon change to my host icon rather than the one visible earlier inde.php PHP Code: <?php PHP Code: <?php I am using same code for both files on my local which works fine Just cant understand what is happening ![]() When i look at the data in mysql i am seeing records enterd as 'NULL' for all columns almost every other row TIA (i can share my weblink in pm) so issue seems to be Despite using "<?php echo $_SERVER["PHP_SELF"]?>" it seems it is not getting redirected to thanks.php but rather to index.php.. any resolution RE: Using API - redirect to thanyou page fail - mrGarvin - Nov 1st, 2012 I wonder if the problem isn´t that you've mixed style and values in the php. Look at the array of parameters: Code: $params = array( You have surrounded the value thanks.php with [b]. I don't think this is the place to style things. This is just a value that is used elsewhere in the code. It should be: "next_page" => "thanks.php", Did that help? RE: Using API - redirect to thanyou page fail - largomalaga - Feb 13th, 2013 First of all I apologize for my English I have the same problem, when i fill the form, when I put the send button ,don´t redirigue the correct page but again the form page, and don`t show the contect. The form data is correct write in the database FORMTOOLS. The code in the page contacto.php <?php require_once("formtools/global/api/api.php"); $fields = ft_api_init_form_page(2); $params = array( "submit_button" => "enviar", "next_page" => "gracias.php", "form_data" => $_POST, "finalize" => true ); ft_api_process_form($params); ?> The code in the page gracias.php <?php require_once("formtools/global/api/api.php"); $fields = ft_api_init_form_page(2); ft_api_clear_form_sessions(); ?> The code in page has put on head label, When finish install form run de gracias.php for finish session Any idea, thanks RE: Using API - redirect to thanyou page fail - Joe - Feb 27th, 2013 Do you have "enviar" named in your submit button? RE: Using API - redirect to thanyou page fail - mderrick - Jun 5th, 2013 I'm having the exact same problem. Everything in the form passes to Form Tools and looks great. Only problem is the thank you page doesn't display. I get an blank page with the entry form address. Form: <?php require_once("prisms/global/api/api.php"); $fields = ft_api_init_form_page(1); $params = array( "submit_button" => "submit", "next_page" => "prism2013thankyou.php", "form_data" => $_POST, "file_data" => $_FILES, "finalize" => true ); ft_api_process_form($params); ?> Thank you: <?php require_once("prisms/global/api/api.php"); $fields = ft_api_init_form_page(1); ft_api_clear_form_sessions(); ?> Any suggestions? Thanks! RE: Using API - redirect to thanyou page fail - jrandell - Jul 24th, 2013 Hi mderrick, I had the same issue myself, it was very frustrating but I found a solution (that worked for me) I had noticed people in the forums using a path like this: "/home2/UserAcct/public_html/projectName/formtools/global/api/api.php" I have never used this type of path as a file reference to a web page, it would not have occurred to me. But, I tried it out in the 3 file references at issue: require_once (on result page) require_once (on Form Page) $params > next_page (on Form Page) The Solution (if you want to call it that - it feels like spit and bubble gum to me) was using the correct path format for the correct file references. Using the same path format for all three file references did not work (for me). It was only when I accidentally left the path formats inconsistent, that I started getting responses on submits, and realized the path types were mix n' match. From there, it was not long before I found the correct combination (which works for me anyway): require_once (on result page) uses a path like: /home2/UserAcct/public_html/projectName/formtools/etc... require_once (on Form Page) same type of path as above $params > next_page (on Form Page) = /formtools/global/posforms/posresult.php It looked to me like other combinations might work, and maybe this is not the correct solution. But I had lost enough time on this and had better just move on to the next part. I sure hope this helps! best, Jim |