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...
More information...in the process.php file i added the following to generate a random student ID and password...
...then when process.php builds the query i added those two fields thusly...
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.
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.