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
Changed form, now getting error - 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: Changed form, now getting error (/showthread.php?tid=5310)



Changed form, now getting error - larryb - Aug 26th, 2015

I got the following error after trying to submit a form that i had changed recently...and the link told me to post the issue onto this forum...

Quote:Error Type: System
Error Code: #304 — Learn more about this error.

Debugging:

Failed query in ft_process_form, /home/drbray/public_html/ftools/process.php, line 260:
INSERT INTO frm_form_5 (name, phone, email, address1, address2, city, state, zip, birthdate, marital, church_name, pastor_name, church_address, church_city, church_state, church_zipcode, church_contact_phone, church_contact_email, church_website, class_registering_for, submit, submission_date, last_modified_date, ip_address, is_finalized, student_id, forum_pw)
VALUES ('Testing new Registration Form', '3334445555', 'email@internet.com', '400 Street Lane', 'Apt #3', 'Alberta', 'CA', '99999', '1970-10-01', 'Married', 'test church', 'pastor test', 'addy of church', 'Alameda', 'CA', '99999', '3334445555', 'email@internet.com', 'http://www.rpcb.org', 'test class subject', 'Submit Information', '2015-08-26 16:37:42', '2015-08-26 16:37:42', '10.10.10.10', 'yes', '723GJNV4GM', 'UPA7YSUVBX')

More information...in the process.php file i added the following to generate a random student ID and password...

PHP Code:
function generateRandomString($length 10) {
    
$characters '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
    
$charactersLength strlen($characters);
    
$randomString '';
    for (
$i 0$i $length$i++) {
        
$randomString .= $characters[rand(0$charactersLength 1)];
    }
    return 
$randomString;
}
$studentID generateRandomString();
$forumPW generateRandomString(); 

...then when process.php builds the query i added those two fields thusly...

PHP Code:
$query "
    INSERT INTO 
{$g_table_prefix}form_$form_id ($col_names_str submission_date, last_modified_date, ip_address, is_finalized, student_id, forum_pw)
    VALUES (
$col_values_str '$now', '$now', '$ip_address', 'yes', '$studentID', '$forumPW')
           "



The most recent change that i did was to remove a textarea field and add some new text fields.

Any help would be greatly appreciated.