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
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
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
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 displaying data on result page - 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 displaying data on result page (/showthread.php?tid=691)



Need help displaying data on result page - julienetspock - May 8th, 2010

Hello

I followed tutorial " Displaying data on POST form receipt pages "

But i don't want to use the unique key option

I don't know how to display result without using this feature

here is my result.php page :
PHP Code:
<?php
require_once("/home/xxx/public_html/formtools/global/api/api.php");
?>
<?php
if (isset($_GET["submission_id"]) && isset($_GET["unique_key"]))
{
  
$form_id 2;
  
$view_id 1;
  
$export_type_id 1;
 
  
$submission_info ft_api_get_submission($form_id$_GET["submission_id"]);
 
  
// now confirm that the unique_key matches
  
if (isset($submission_info["unique_key"]) && 
    
$submission_info["unique_key"] == $_GET["unique_key"])
  {
    
ft_api_show_submission($form_id$view_id$export_type_id$_GET["submission_id"]);
  }    
}
?>
<?php
echo $submission_info["element_1"]; // first name!
echo $submission_info["element_2"]; // last name!
?>


What do i need to modify to remove the unique key verification ? i don't want to have that in the url

thanks


RE: Need help displaying data on result page - Ben - May 8th, 2010

Hi Julie,

Sure, no worries! In that case, don't bother creating that unique key field in the database - or if you already have, just go and delete it.

Next, tweak your code a bit to remove any reference to it:

PHP Code:
<?php
require_once("/home/xxx/public_html/formtools/global/api/api.php");

if (isset(
$_GET["submission_id"]))
{
  
$form_id 2;
  
$view_id 1;
  
$export_type_id 1;
 
  
$submission_info ft_api_get_submission($form_id$_GET["submission_id"]);
 
    
ft_api_show_submission($form_id$view_id$export_type_id$_GET["submission_id"]);
}

echo 
$submission_info["element_1"]; // first name!
echo $submission_info["element_2"]; // last name!
?>

And that's it! Smile

- Ben


RE: Need help displaying data on result page - julienetspock - May 8th, 2010

Thank you for this quick reply

i get an error message :

ERROR
Error Type: User
Error Code: #402 — Learn more about this error.


RE: Need help displaying data on result page - Ben - May 11th, 2010

Hi Julie,

Ah! Did you check the error code page?
http://docs.formtools.org/api/?page=error_codes

The problem is that the View ID being passed to the ft_api_show_submissions function is invalid.

All the best -

Ben