chrismassey
Programmer
Hello,
I have almost finished a user registration form. Currently I have not completed the validation (regex) of form fields, though it is pretty much ready.
Whilst testing I suddenly came across an Error 500, and I have no idea why. It was working before so I can only assume i've made a mistake somewhere.
Syntax checker simply says there is a syntax error at line 303, aborted at line 350. Therefore I assumed it is to do with this section...
Any ideas why it no longer works, considering it was working perfectly before. The only change I can remember making before it stopped working was a simple change within a qq() tag just before the failing section.
Although I do not expect anyone to read through it, I will post my entire code in case...
[tt]------------------------------------------------------------
Pragmas (perl 5.8.8) used :
[ul]
[li]diagnostics - Produce verbose warning diagnostics[/li]
[li]strict - Perl pragma to restrict unsafe constructs[/li]
[li]warnings - Perl pragma to control optional warnings[/li]
[/ul]
Core (perl 5.8.8) Modules used :
[ul]
[li]CGI - Simple Common Gateway Interface Class[/li]
[/ul]
Other Modules used :
[ul]
[li]HTML::Template[/li]
[li]HTML::Template[/li]
[li]MIME::Lite[/li]
[/ul]
[/tt]
Chris
I have almost finished a user registration form. Currently I have not completed the validation (regex) of form fields, though it is pretty much ready.
Whilst testing I suddenly came across an Error 500, and I have no idea why. It was working before so I can only assume i've made a mistake somewhere.
Syntax checker simply says there is a syntax error at line 303, aborted at line 350. Therefore I assumed it is to do with this section...
Code:
## Create a subscriptions file in user folder and copy contents of default subscriptions file
open (LOG, "<$secure_path$d_subscriptions_file_loc") || die "Cannot open: $secure_path$d_subscriptions_file_loc";
flock (LOG, 2) || die "Cannot flock: $secure_path$d_subscriptions_file_loc";
my @log1 = <LOG>;
close (LOG) || die "Cannot close: $secure_path$d_subscriptions_file_loc";
Any ideas why it no longer works, considering it was working perfectly before. The only change I can remember making before it stopped working was a simple change within a qq() tag just before the failing section.
Although I do not expect anyone to read through it, I will post my entire code in case...
Code:
[ol]
[li][gray]#! /usr/bin/perl[/gray][/li]
[li][url=http://perldoc.perl.org/functions/use.html][black][b]use[/b][/black][/url] [green]strict[/green][red];[/red][/li]
[li][black][b]use[/b][/black] [green]CGI[/green] [red]'[/red][purple]:standard[/purple][red]'[/red][red];[/red][/li]
[li][black][b]use[/b][/black] [green]diagnostics[/green][red];[/red][/li]
[li][black][b]use[/b][/black] [green]warnings[/green][red];[/red][/li]
[li][url=http://perldoc.perl.org/functions/print.html][black][b]print[/b][/black][/url] [red]"[/red][purple]Content-type: text/html[purple][b]\n[/b][/purple][purple][b]\n[/b][/purple][/purple][red]"[/red][red];[/red][/li]
[li][/li]
[li][gray][i]##### MODULES USED >>>>> | strict | CGI ':standard' | diagnostics | warnings | Mime::Lite | HTML::Template |[/i][/gray][/li]
[li][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][url=http://perldoc.perl.org/functions/my.html][black][b]my[/b][/black][/url] [red]([/red][blue]$date_time[/blue][red])[/red][red];[/red][/li]
[li][black][b]my[/b][/black] [red]([/red][blue]$sec[/blue], [blue]$min[/blue], [blue]$hour[/blue], [blue]$mday[/blue], [blue]$mon[/blue], [blue]$year[/blue][red])[/red]=[url=http://perldoc.perl.org/functions/gmtime.html][black][b]gmtime[/b][/black][/url][red];[/red][/li]
[li][gray][i]##### DATE/TIME[/i][/gray][/li]
[li][blue]$date_time[/blue] = [url=http://perldoc.perl.org/functions/sprintf.html][black][b]sprintf[/b][/black][/url] [red]([/red][red]'[/red][purple]%02d/%02d/%4d - %02d:%02d:%02d[/purple][red]'[/red], [blue]$mday[/blue], [blue]$mon[/blue]+[fuchsia]1[/fuchsia], [blue]$year[/blue]+[fuchsia]1900[/fuchsia], [blue]$hour[/blue], [blue]$min[/blue], [blue]$sec[/blue][red])[/red][red];[/red][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][black][b]my[/b][/black] [red]([/red][blue]$validate_counter[/blue], [blue]$secure_path[/blue], [blue]$users_folder_path[/blue], [blue]$event_log_path[/blue], [blue]$profile_file_name[/blue], [blue]$subscriptions_file_name[/blue], [blue]$d_subscriptions_file_loc[/blue][red])[/red][red];[/red][/li]
[li][gray][i]##### INITIAL VALUES - ## 1, validation counter initial value - ## 2, path to secure directory - ## 3, path to users directory - ## 4, path to events log file - ## 5, profile file name - ## 6, subscriptions file name - ## 7, default subscriptions file path[/i][/gray][/li]
[li][gray][i]## 1[/i][/gray][/li]
[li][blue]$validate_counter[/blue] = [fuchsia]0[/fuchsia][red];[/red][/li]
[li][gray][i]## 2[/i][/gray][/li]
[li][blue]$secure_path[/blue] = [red]"[/red][purple]/PATH/[/purple][red]"[/red][red];[/red][/li]
[li][gray][i]## 3[/i][/gray][/li]
[li][blue]$users_folder_path[/blue] = [red]"[/red][purple]Users/[/purple][red]"[/red][red];[/red][/li]
[li][gray][i]## 4[/i][/gray][/li]
[li][blue]$event_log_path[/blue] = [red]"[/red][purple]Admin/Logs/Event_Log/event_log.htm[/purple][red]"[/red][red];[/red][/li]
[li][gray][i]## 5[/i][/gray][/li]
[li][blue]$profile_file_name[/blue] = [red]"[/red][purple]/profile.txt[/purple][red]"[/red][red];[/red][/li]
[li][gray][i]## 6[/i][/gray][/li]
[li][blue]$subscriptions_file_name[/blue] = [red]"[/red][purple]/subscriptions.txt[/purple][red]"[/red][red];[/red][/li]
[li][gray][i]## 7[/i][/gray][/li]
[li][blue]$d_subscriptions_file_loc[/blue] = [red]"[/red][purple]Default_Subscriptions_File/default_subscriptions.txt[/purple][red]"[/red][red];[/red][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][gray][i]##### FAILED VALIDATION MESSAGES[/i][/gray][/li]
[li][black][b]my[/b][/black] [red]([/red][blue]$execution_check_m[/blue][red])[/red][red];[/red][/li]
[li][gray][i]## EXECUTION CHECK[/i][/gray][/li]
[li][blue]$execution_check_m[/blue] = [red]'[/red][purple]Illegal Access[/purple][red]'[/red][red];[/red][/li]
[li][/li]
[li][black][b]my[/b][/black] [red]([/red][blue]$html_begin[/blue], [blue]$html_end[/blue][red])[/red][red];[/red][/li]
[li][gray][i]## HTML Tags[/i][/gray][/li]
[li][blue]$html_begin[/blue] = [red]qq([/red][purple]<font size="2" color="#FF0000" face="Arial"><LI>[/purple][red])[/red][red];[/red][/li]
[li][blue]$html_end[/blue] = [red]qq([/red][purple]<br></font>[/purple][red])[/red][red];[/red][/li]
[li][/li]
[li][black][b]my[/b][/black] [red]([/red][blue]$choose_username_m[/blue], [blue]$choose_usernameb_m[/blue], [blue]$choose_password_m[/blue], [blue]$confirm_password_m[/blue], [blue]$title_m[/blue], [blue]$other_title_m[/blue], [blue]$first_name_m[/blue], [blue]$last_name_m[/blue], [blue]$email_m[/blue], [blue]$confirm_email_m[/blue], [blue]$address_1_m[/blue], [blue]$address_2_m[/blue], [blue]$town_city_m[/blue], [blue]$county_m[/blue], [blue]$postcode_m[/blue], [blue]$country_m[/blue], [blue]$telephone_m[/blue], [blue]$fax_m[/blue], [blue]$accept_terms_m[/blue][red])[/red][red];[/red][/li]
[li][gray][i]## MESSAGES[/i][/gray][/li]
[li][blue]$choose_username_m[/blue] = [red]'[/red][purple]Choose A Username - Username must be 4-20 characters long (a-z, 0-9, _ ONLY).[/purple][red]'[/red][red];[/red][/li]
[li][blue]$choose_usernameb_m[/blue] = [red]'[/red][purple]Choose A Username - This Username already exists. Please choose another.[/purple][red]'[/red][red];[/red][/li]
[li][blue]$choose_password_m[/blue] = [red]'[/red][purple]Choose A Password - Password must be atleast 8 chracters long.[/purple][red]'[/red][red];[/red][/li]
[li][blue]$confirm_password_m[/blue] = [red]'[/red][purple]Confirm Your password - Does not match your Password.[/purple][red]'[/red][red];[/red][/li]
[li][blue]$title_m[/blue] = [red]'[/red][purple]Title - Choose one.[/purple][red]'[/red][red];[/red][/li]
[li][blue]$other_title_m[/blue] = [red]'[/red][purple]Other Title - If Title=Other, please specify (a-z, A-Z ONLY).[/purple][red]'[/red][red];[/red][/li]
[li][blue]$first_name_m[/blue] = [red]'[/red][purple]First Name - First Name must be no more than 40 characters long (a-z, A-Z ONLY).[/purple][red]'[/red][red];[/red][/li]
[li][blue]$last_name_m[/blue] = [red]'[/red][purple]Last Name - Last Name must be no more than 40 characters long (a-z, A-Z ONLY).[/purple][red]'[/red][red];[/red][/li]
[li][blue]$email_m[/blue] = [red]'[/red][purple]Email Address - I.E. email@domain.com.[/purple][red]'[/red][red];[/red][/li]
[li][blue]$confirm_email_m[/blue] = [red]'[/red][purple]Confirm Email Address - Does not match your Email.[/purple][red]'[/red][red];[/red][/li]
[li][blue]$address_1_m[/blue] = [red]'[/red][purple]Address Line 1 - (a-z, A-Z, 0-9 ONLY).[/purple][red]'[/red][red];[/red][/li]
[li][blue]$address_2_m[/blue] = [red]'[/red][purple]Address Line 2 - (a-z, A-Z, 0-9 ONLY).[/purple][red]'[/red][red];[/red][/li]
[li][blue]$town_city_m[/blue] = [red]'[/red][purple]Town/City - (a-z, A-Z, ONLY).[/purple][red]'[/red][red];[/red][/li]
[li][blue]$county_m[/blue] = [red]'[/red][purple]County - (a-z, A-Z, ONLY).[/purple][red]'[/red][red];[/red][/li]
[li][blue]$postcode_m[/blue] = [red]'[/red][purple]Postcode - (a-z, A-Z, 0-9 ONLY).[/purple][red]'[/red][red];[/red][/li]
[li][blue]$country_m[/blue] = [red]'[/red][purple]Country - Choose one.[/purple][red]'[/red][red];[/red][/li]
[li][blue]$telephone_m[/blue] = [red]'[/red][purple]Telephone - Telephone must be exactly 11 numbers long (0-9, +s ONLY).[/purple][red]'[/red][red];[/red][/li]
[li][blue]$fax_m[/blue] = [red]'[/red][purple]Fax - Fax must be exactly 11 numbers long (0-9, +s ONLY).[/purple][red]'[/red][red];[/red][/li]
[li][blue]$accept_terms_m[/blue] = [red]'[/red][purple]Accept Terms And Conditions - Checkbox has now been ticked. Untick if you do not accept the Terms And Conditions.[/purple][red]'[/red][red];[/red][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][black][b]my[/b][/black] [red]([/red][blue]$choose_username[/blue], [blue]$choose_password[/blue], [blue]$confirm_password[/blue], [blue]$title[/blue], [blue]$other_title[/blue], [blue]$first_name[/blue], [blue]$last_name[/blue], [blue]$email[/blue], [blue]$confirm_email[/blue], [blue]$address_1[/blue], [blue]$address_2[/blue], [blue]$town_city[/blue], [blue]$county[/blue], [blue]$postcode[/blue], [blue]$country[/blue], [blue]$telephone[/blue], [blue]$fax[/blue], [blue]$accept_terms[/blue], [blue]$execution_check[/blue][red])[/red][red];[/red][/li]
[li][gray][i]##### CONNECT TO REGISTRATION FORM[/i][/gray][/li]
[li][blue]$choose_username[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]choose_username[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$choose_password[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]choose_password[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$confirm_password[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]confirm_password[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$title[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]title[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$other_title[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]other_title[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$first_name[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]first_name[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$last_name[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]last_name[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$email[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]email[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$confirm_email[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]confirm_email[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$address_1[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]address_1[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$address_2[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]address_2[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$town_city[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]town_city[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$county[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]county[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$postcode[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]postcode[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$country[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]country[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$telephone[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]telephone[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$fax[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]fax[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$accept_terms[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]accept_terms[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][blue]$execution_check[/blue] = [maroon]param[/maroon][red]([/red][red]'[/red][purple]execution_check[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][gray][i]## CHECK SCRIPT WAS EXECUTED FROM REGISTRATION FORM[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$execution_check[/blue] == [fuchsia]1[/fuchsia][red])[/red] [red]{[/red][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][gray][i]## VARIABLE CONVERSIONS[/i][/gray][/li]
[li][gray][i]## Change choose_username to lowercase characters[/i][/gray][/li]
[li][blue]$choose_username[/blue] = [url=http://perldoc.perl.org/functions/lc.html][black][b]lc[/b][/black][/url][red]([/red][blue]$choose_username[/blue][red])[/red][red];[/red][/li]
[li][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][black][b]my[/b][/black] [red]([/red][blue]$validate_1_warn[/blue], [blue]$validate_1b_warn[/blue], [blue]$validate_2_warn[/blue], [blue]$validate_3_warn[/blue], [blue]$validate_4_warn[/blue], [blue]$validate_5_warn[/blue], [blue]$validate_6_warn[/blue], [blue]$validate_7_warn[/blue], [blue]$validate_8_warn[/blue], [blue]$validate_9_warn[/blue], [blue]$validate_10_warn[/blue], [blue]$validate_11_warn[/blue], [blue]$validate_12_warn[/blue], [blue]$validate_13_warn[/blue], [blue]$validate_14_warn[/blue], [blue]$validate_15_warn[/blue], [blue]$validate_16_warn[/blue], [blue]$validate_17_warn[/blue], [blue]$validate_18_warn[/blue][red])[/red][red];[/red][/li]
[li][gray][i]##### VALIDATE REGISTRATION FORM[/i][/gray][/li]
[li][gray][i]####################################### 1[/i][/gray][/li]
[li][gray][i]##Regex## choose_username[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$choose_username[/blue] =~ [red]/[/red][purple][/purple][red]/[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red][/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_1_warn[/blue] = [red]qq([/red][purple]$html_begin$choose_username_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 2 [/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][url=http://perldoc.perl.org/functions/-X.html][black][b]-d[/b][/black][/url] [red]"[/red][purple][blue]$secure_path[/blue][blue]$users_folder_path[/blue][blue]$choose_username[/blue][/purple][red]"[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_1b_warn[/blue] = [red]qq([/red][purple]$html_begin$choose_usernameb_m$html_end[/purple][red])[/red] [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 3[/i][/gray][/li]
[li][gray][i]##Regex## choose_password[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$choose_password[/blue] =~ [red]/[/red][purple][/purple][red]/[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_2_warn[/blue] = [red]qq([/red][purple]$html_begin$choose_password_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 4[/i][/gray][/li]
[li][gray][i]## confirm_password[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$confirm_password[/blue] eq [red]"[/red][purple][blue]$choose_password[/blue][/purple][red]"[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_3_warn[/blue] = [red]qq([/red][purple]$html_begin$confirm_password_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 5[/i][/gray][/li]
[li][gray][i]## title[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$title[/blue] != [red]"[/red][purple]1[/purple][red]"[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_4_warn[/blue] = [red]qq([/red][purple]$html_begin$title_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 6[/i][/gray][/li]
[li][gray][i]##Regex## other_title[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$title[/blue] eq [red]"[/red][purple]Other[/purple][red]"[/red][red])[/red] [red]{[/red] [/li]
[li] [olive][b]if[/b][/olive] [red]([/red][blue]$other_title[/blue] =~ [red]/[/red][purple][/purple][red]/[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [red]}[/red][/li]
[li] [olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_5_warn[/blue] = [red]qq([/red][purple]$html_begin$other_title$html_end[/purple][red])[/red][red];[/red] [/li]
[li] [red]}[/red] [/li]
[li][red]}[/red][/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_17_warn[/blue] = [red]"[/red][purple][/purple][red]"[/red][red];[/red][/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$title[/blue] ne [red]"[/red][purple]Other[/purple][red]"[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$other_title[/blue] = [red]"[/red][purple][/purple][red]"[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 7[/i][/gray][/li]
[li][gray][i]##Regex## first_name[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$first_name[/blue] =~ [red]/[/red][purple][/purple][red]/[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red][/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_6_warn[/blue] = [red]qq([/red][purple]$html_begin$first_name_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 8[/i][/gray][/li]
[li][gray][i]##Regex## last_name[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$last_name[/blue] =~ [red]/[/red][purple][/purple][red]/[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++[red];[/red] [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_7_warn[/blue] = [red]qq([/red][purple]$html_begin$last_name_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 9[/i][/gray][/li]
[li][gray][i]##Regex## email[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$email[/blue] =~ [red]/[/red][purple][/purple][red]/[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_8_warn[/blue] = [red]qq([/red][purple]$html_begin$email_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 10[/i][/gray][/li]
[li][gray][i]## confirm_email[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$confirm_email[/blue] eq [red]"[/red][purple][blue]$email[/blue][/purple][red]"[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_9_warn[/blue] = [red]qq([/red][purple]$html_begin$confirm_email_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 11[/i][/gray][/li]
[li][gray][i]##Regex## address_1[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$address_1[/blue] =~ [red]/[/red][purple][/purple][red]/[/red][red])[/red] [red]{[/red][/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_10_warn[/blue] = [red]qq([/red][purple]$html_begin$address_1_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 12[/i][/gray][/li]
[li][gray][i]##Regex## address_2[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$address_2[/blue] =~ [red]/[/red][purple][/purple][red]/[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_11_warn[/blue] = [red]qq([/red][purple]$html_begin$address_2_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$address_2[/blue] eq [red]"[/red][purple][/purple][red]"[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++[red];[/red] [blue]$validate_11_warn[/blue] = [red]"[/red][purple][/purple][red]"[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 13[/i][/gray][/li]
[li][gray][i]##Regex## town_city[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$town_city[/blue] =~ [red]/[/red][purple][/purple][red]/[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_12_warn[/blue] = [red]qq([/red][purple]$html_begin$town_city_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 14[/i][/gray][/li]
[li][gray][i]##Regex## county[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$county[/blue] =~ [red]/[/red][purple][/purple][red]/[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_13_warn[/blue] = [red]qq([/red][purple]$html_begin$county_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$county[/blue] eq [red]"[/red][purple][/purple][red]"[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++[red];[/red] [blue]$validate_13_warn[/blue] = [red]"[/red][purple][/purple][red]"[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 15[/i][/gray][/li]
[li][gray][i]##Regex## postcode[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$postcode[/blue] =~ [red]/[/red][purple][/purple][red]/[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_14_warn[/blue] = [red]qq([/red][purple]$html_begin$postcode_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 16[/i][/gray][/li]
[li][gray][i]## country[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$country[/blue] != [red]"[/red][purple]1[/purple][red]"[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_15_warn[/blue] = [red]qq([/red][purple]$html_begin$country_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 17[/i][/gray][/li]
[li][gray][i]##Regex## telephone[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$telephone[/blue] =~ [red]/[/red][purple][/purple][red]/[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_16_warn[/blue] = [red]qq([/red][purple]$html_begin$telephone_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 18[/i][/gray][/li]
[li][gray][i]##Regex## fax[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$fax[/blue] =~ [red]/[/red][purple][/purple][red]/[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++ [/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red] [/li]
[li] [blue]$validate_17_warn[/blue] = [red]qq([/red][purple]$html_begin$fax_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$fax[/blue] eq [red]"[/red][purple][/purple][red]"[/red][red])[/red] [red]{[/red] [/li]
[li] [blue]$validate_counter[/blue]++[red];[/red] [blue]$validate_17_warn[/blue] = [red]"[/red][purple][/purple][red]"[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]####################################### 19[/i][/gray][/li]
[li][black][b]my[/b][/black] [red]([/red][blue]$accept_terms_length[/blue][red])[/red][red];[/red][/li]
[li][gray][i]## accept_terms[/i][/gray][/li]
[li][blue]$accept_terms_length[/blue] = [url=http://perldoc.perl.org/functions/length.html][black][b]length[/b][/black][/url] [red]([/red][blue]$accept_terms[/blue][red])[/red][red];[/red][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$accept_terms_length[/blue] == [red]"[/red][purple]1[/purple][red]"[/red][red])[/red] [red]{[/red][/li]
[li] [blue]$validate_counter[/blue]++[/li]
[li][red]}[/red] [/li]
[li][olive][b]else[/b][/olive] [red]{[/red][/li]
[li] [blue]$validate_18_warn[/blue] = [red]qq([/red][purple]$html_begin$accept_terms_m$html_end[/purple][red])[/red][red];[/red] [/li]
[li][red]}[/red][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][gray][i]#### VALIDATION PASS[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$validate_counter[/blue] == [fuchsia]19[/fuchsia][red])[/red] [red]{[/red][/li]
[li][/li]
[li][gray][i]####################[/i][/gray][/li]
[li][gray][i]##### IF A NON-COMPULSORY FIELD IS BLANK, FILL IT WITH "None"[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$other_title[/blue] eq [red]"[/red][purple][/purple][red]"[/red][red])[/red] [red]{[/red] [blue]$other_title[/blue] = [red]"[/red][purple]None[/purple][red]"[/red][red];[/red] [red]}[/red][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$address_2[/blue] eq [red]"[/red][purple][/purple][red]"[/red][red])[/red] [red]{[/red] [blue]$address_2[/blue] = [red]"[/red][purple]None[/purple][red]"[/red][red];[/red] [red]}[/red][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$county[/blue] eq [red]"[/red][purple][/purple][red]"[/red][red])[/red] [red]{[/red] [blue]$county[/blue] = [red]"[/red][purple]None[/purple][red]"[/red][red];[/red] [red]}[/red][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$fax[/blue] eq [red]"[/red][purple][/purple][red]"[/red][red])[/red] [red]{[/red] [blue]$fax[/blue] = [red]"[/red][purple]None[/purple][red]"[/red][red];[/red] [red]}[/red][/li]
[li][/li]
[li][gray][i]####################[/i][/gray][/li]
[li][gray][i]## Create user folder[/i][/gray][/li]
[li][url=http://perldoc.perl.org/functions/mkdir.html][black][b]mkdir[/b][/black][/url] [red]([/red][red]"[/red][purple][blue]$secure_path[/blue][blue]$users_folder_path[/blue][blue]$choose_username[/blue][/purple][red]"[/red], [fuchsia]0777[/fuchsia][red])[/red] || [url=http://perldoc.perl.org/functions/die.html][black][b]die[/b][/black][/url] [red]"[/red][purple]Cannot Open: [blue]$secure_path[/blue][blue]$users_folder_path[/blue][blue]$choose_username[/blue][/purple][red]"[/red][red];[/red][/li]
[li][/li]
[li][gray][i]## Create a new profile in user folder[/i][/gray][/li]
[li][url=http://perldoc.perl.org/functions/open.html][black][b]open[/b][/black][/url] [red]([/red]LOG, [red]"[/red][purple]>[blue]$secure_path[/blue][blue]$users_folder_path[/blue][blue]$choose_username[/blue][blue]$profile_file_name[/blue][/purple][red]"[/red][red])[/red] || [black][b]die[/b][/black] [red]"[/red][purple]Cannot open: [blue]$secure_path[/blue][blue]$users_folder_path[/blue][blue]$choose_username[/blue][blue]$profile_file_name[/blue][/purple][red]"[/red][red];[/red][/li]
[li][url=http://perldoc.perl.org/functions/flock.html][black][b]flock[/b][/black][/url] [red]([/red]LOG, [fuchsia]2[/fuchsia][red])[/red] || [black][b]die[/b][/black] [red]"[/red][purple]Cannot flock: [blue]$secure_path[/blue][blue]$users_folder_path[/blue][blue]$choose_username[/blue][blue]$profile_file_name[/blue][/purple][red]"[/red][red];[/red][/li]
[li][black][b]print[/b][/black] LOG [red]"[/red][purple][blue]$choose_username[/blue]|[blue]$choose_password[/blue]|[blue]$title[/blue]|[blue]$other_title[/blue]|[blue]$first_name[/blue]|[blue]$last_name[/blue]|[blue]$email[/blue]|[blue]$address_1[/blue]|[blue]$address_2[/blue]|[blue]$town_city[/blue]|[blue]$county[/blue]|[blue]$postcode[/blue]|[blue]$country[/blue]|[blue]$telephone[/blue]|[blue]$fax[/blue]|[blue]$accept_terms[/blue]|[blue]$execution_check[/blue][/purple][red]"[/red][red];[/red][/li]
[li][url=http://perldoc.perl.org/functions/close.html][black][b]close[/b][/black][/url] [red]([/red]LOG[red])[/red][/li]
[li][/li]
[li][gray][i]## Create a subscriptions file in user folder and copy contents of default subscriptions file[/i][/gray][/li]
[li][black][b]open[/b][/black] [red]([/red]LOG, [red]"[/red][purple]<[blue]$secure_path[/blue][blue]$d_subscriptions_file_loc[/blue][/purple][red]"[/red][red])[/red] || [black][b]die[/b][/black] [red]"[/red][purple]Cannot open: [blue]$secure_path[/blue][blue]$d_subscriptions_file_loc[/blue][/purple][red]"[/red][red];[/red][/li]
[li][black][b]flock[/b][/black] [red]([/red]LOG, [fuchsia]2[/fuchsia][red])[/red] || [black][b]die[/b][/black] [red]"[/red][purple]Cannot flock: [blue]$secure_path[/blue][blue]$d_subscriptions_file_loc[/blue][/purple][red]"[/red][red];[/red][/li]
[li][black][b]my[/b][/black] [blue]@log1[/blue] = <LOG>[red];[/red][/li]
[li][black][b]close[/b][/black] [red]([/red]LOG[red])[/red] || [black][b]die[/b][/black] [red]"[/red][purple]Cannot close: [blue]$secure_path[/blue][blue]$d_subscriptions_file_loc[/blue][/purple][red]"[/red][red];[/red][/li]
[li][/li]
[li][black][b]open[/b][/black] [red]([/red]LOG, [red]"[/red][purple]>[blue]$secure_path[/blue][blue]$users_folder_path[/blue][blue]$choose_username[/blue][blue]$subscriptions_file_name[/blue][/purple][red]"[/red][red])[/red] || [black][b]die[/b][/black] [red]"[/red][purple]Cannot open: [blue]$secure_path[/blue][blue]$users_folder_path[/blue][blue]$choose_username[/blue][blue]$subscriptions_file_name[/blue][/purple][red]"[/red][red];[/red][/li]
[li][black][b]flock[/b][/black] [red]([/red]LOG, [fuchsia]2[/fuchsia][red])[/red] || [black][b]die[/b][/black] [red]"[/red][purple]Cannot flock: [blue]$secure_path[/blue][blue]$users_folder_path[/blue][blue]$choose_username[/blue][blue]$subscriptions_file_name[/blue][/purple][red]"[/red][red];[/red][/li]
[li][black][b]print[/b][/black] LOG [red]"[/red][purple][blue]@log1[/blue][/purple][red]"[/red][red];[/red][/li]
[li][black][b]close[/b][/black] [red]([/red]LOG[red])[/red][red];[/red][/li]
[li][gray][i]####################[/i][/gray][/li]
[li][gray][i]## Log new event[/i][/gray][/li]
[li][black][b]open[/b][/black] [red]([/red]LOG, [red]"[/red][purple]<[blue]$secure_path[/blue][blue]$event_log_path[/blue][/purple][red]"[/red][red])[/red] || [black][b]die[/b][/black] [red]"[/red][purple]Cannot open: [blue]$secure_path[/blue][blue]$event_log_path[/blue][/purple][red]"[/red][red];[/red][/li]
[li][black][b]flock[/b][/black] [red]([/red]LOG, [fuchsia]2[/fuchsia][red])[/red] || [black][b]die[/b][/black] [red]"[/red][purple]Cannot flock: [blue]$secure_path[/blue][blue]$event_log_path[/blue][/purple][red]"[/red][red];[/red][/li]
[li][black][b]my[/b][/black] [blue]@log2[/blue] = <LOG>[red];[/red][/li]
[li][black][b]close[/b][/black] [red]([/red]LOG[red])[/red] || [black][b]die[/b][/black] [red]"[/red][purple]Cannot close: [blue]$secure_path[/blue][blue]$event_log_path[/blue][/purple][red]"[/red][red];[/red][/li]
[li][/li]
[li][black][b]open[/b][/black] [red]([/red]LOG, [red]"[/red][purple]>[blue]$secure_path[/blue][blue]$event_log_path[/blue][/purple][red]"[/red][red])[/red] || [black][b]die[/b][/black] [red]"[/red][purple]Cannot open: [blue]$secure_path[/blue][blue]$event_log_path[/blue][/purple][red]"[/red][red];[/red][/li]
[li][black][b]flock[/b][/black] [red]([/red]LOG, [fuchsia]2[/fuchsia][red])[/red] || [black][b]die[/b][/black] [red]"[/red][purple]Cannot flock: [blue]$secure_path[/blue][blue]$event_log_path[/blue][/purple][red]"[/red][red];[/red][/li]
[li][black][b]print[/b][/black] LOG [red]qq([/red][purple][/purple][/li]
[li][purple]<div align="center">[/purple][/li]
[li][purple] <center>[/purple][/li]
[li][purple] <table border="1" cellspacing="1" width="100%" bordercolor="#000000">[/purple][/li]
[li][purple] <tr>[/purple][/li]
[li][purple] <td width="100%" bordercolor="#FFFFFF">[/purple][/li]
[li][purple] <p><font face="Arial" size="3" color="#0000FF"><b>New Registration</b></font><font size="2" face="Arial"> - <b>Date/Time:</b> $date_time,<b> Name:</b> $title $first_name $last_name,<b> Email:</b> $email,<b> Username:</b> $choose_username</font></p>[/purple][/li]
[li][purple] </td>[/purple][/li]
[li][purple] </tr>[/purple][/li]
[li][purple] </table>[/purple][/li]
[li][purple] </center>[/purple][/li]
[li][purple]</div>[/purple][/li]
[li][purple][/purple][red])[/red][red];[/red][/li]
[li][black][b]print[/b][/black] LOG [red]"[/red][purple][blue]@log2[/blue][/purple][red]"[/red][red];[/red][/li]
[li][black][b]close[/b][/black] [red]([/red]LOG[red])[/red][red];[/red][/li]
[li][gray][i]####################[/i][/gray][/li]
[li][black][b]my[/b][/black] [red]([/red][blue]$confirmation_email_print[/blue][red])[/red][red];[/red][/li]
[li][gray][i]## Confirmation email[/i][/gray][/li]
[li][blue]$confirmation_email_print[/blue] = [red]"[/red][purple][/purple][/li]
[li][purple]Dear [blue]$first_name[/blue],[purple][b]\n[/b][/purple][/purple][/li]
[li][purple]Thank you for registering with Medical-Book.co.uk.[/purple][/li]
[li][purple]Login URL: [URL unfurl="true"]http://medical-book.co.uk/Login_And_Register/Login.htm[/URL][purple][b]\n[/b][/purple][/purple][/li]
[li][purple]Username: [blue]$choose_username[/blue][/purple][/li]
[li][purple]Password: [blue]$choose_password[/blue][purple][b]\n[/b][/purple][/purple][/li]
[li][purple]> Medical-Book.co.uk ( [blue]$date_time[/blue] ) <[/purple][red]"[/red][red];[/red][/li]
[li][/li]
[li][gray][i]## Send confirmation email[/i][/gray][/li]
[li][black][b]use[/b][/black] [green]MIME::Lite[/green][red];[/red][/li]
[li][black][b]my[/b][/black] [red]([/red][blue]$confirmation_email[/blue][red])[/red][red];[/red][/li]
[li][blue]$confirmation_email[/blue] = MIME::Lite->[maroon]new[/maroon][red]([/red][purple]From[/purple] => [red]'[/red][purple]Medical-Book.co.uk[/purple][red]'[/red],[/li]
[li] [purple]To[/purple] => [red]"[/red][purple][blue]$email[/blue][/purple][red]"[/red],[/li]
[li] [purple]Subject[/purple] => [red]'[/red][purple]Registration Confirmation[/purple][red]'[/red],[/li]
[li] [purple]Type[/purple] => [red]'[/red][purple]multipart/mixed[/purple][red]'[/red][red])[/red][red];[/red][/li]
[li] [blue]$confirmation_email[/blue]->[maroon]attach[/maroon][red]([/red][purple]Type[/purple] => [red]'[/red][purple]TEXT[/purple][red]'[/red],[/li]
[li] [purple]Data[/purple] => [red]"[/red][purple][blue]$confirmation_email_print[/blue][/purple][red]"[/red][red])[/red][red];[/red][/li]
[li][/li]
[li][blue]$confirmation_email[/blue]->[maroon]send[/maroon][red]([/red][red])[/red][red];[/red][/li]
[li][gray][i]####################[/i][/gray][/li]
[li][/li]
[li][gray][i]####################[/i][/gray][/li]
[li][gray][i]## Confirmation page[/i][/gray][/li]
[li][black][b]use[/b][/black] [green]HTML::Template[/green][red];[/red][/li]
[li][black][b]my[/b][/black] [red]([/red][blue]$template[/blue][red])[/red][red];[/red][/li]
[li][blue]$template[/blue] = HTML::Template->[maroon]new[/maroon][red]([/red][purple]filename[/purple] => [red]"[/red][purple]Register_Complete.htm[/purple][red]"[/red][red])[/red][red];[/red][/li]
[li][black][b]print[/b][/black] [red]"[/red][purple]Content-Type: text/html[purple][b]\n[/b][/purple][purple][b]\n[/b][/purple][/purple][red]"[/red], [blue]$template[/blue]->[maroon]output[/maroon][red];[/red][/li]
[li][gray][i]####################[/i][/gray][/li]
[li][red]}[/red][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][black][b]my[/b][/black] [red]([/red][blue]$field_failed_counter[/blue], [blue]$reg_failed_message[/blue][red])[/red][red];[/red][/li]
[li][gray][i]##### VALIDATION FAIL[/i][/gray][/li]
[li][olive][b]if[/b][/olive] [red]([/red][blue]$validate_counter[/blue] != [fuchsia]19[/fuchsia][red])[/red] [red]{[/red][/li]
[li][blue]$field_failed_counter[/blue] = [fuchsia]19[/fuchsia] - [blue]$validate_counter[/blue][red];[/red][/li]
[li][blue]$reg_failed_message[/blue] = [red]qq([/red][purple]<p><font face="Arial" size="2"><b>Registration form completed incorrectly. Please check the following:</b></font></p>[/purple][red])[/red][red];[/red][/li]
[li][black][b]use[/b][/black] [green]HTML::Template[/green][red];[/red][/li]
[li][black][b]my[/b][/black] [red]([/red][blue]$template2[/blue][red])[/red][red];[/red][/li]
[li][blue]$template2[/blue] = HTML::Template->[maroon]new[/maroon][red]([/red][purple]filename[/purple] => [red]"[/red][purple]Register_Failed.htm[/purple][red]"[/red][red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]REGFAILEDMESSAGE[/purple] => [red]"[/red][purple][blue]$reg_failed_message[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE1[/purple] => [red]"[/red][purple][blue]$validate_1_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]PRINT1[/purple] => [red]"[/red][purple][blue]$choose_username[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE1B[/purple] => [red]"[/red][purple][blue]$validate_1b_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE2[/purple] => [red]"[/red][purple][blue]$validate_2_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE3[/purple] => [red]"[/red][purple][blue]$validate_3_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE4[/purple] => [red]"[/red][purple][blue]$validate_4_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE5[/purple] => [red]"[/red][purple][blue]$validate_5_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]PRINT5[/purple] => [red]"[/red][purple][blue]$other_title[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE6[/purple] => [red]"[/red][purple][blue]$validate_6_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]PRINT6[/purple] => [red]"[/red][purple][blue]$first_name[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE7[/purple] => [red]"[/red][purple][blue]$validate_7_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]PRINT7[/purple] => [red]"[/red][purple][blue]$last_name[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE8[/purple] => [red]"[/red][purple][blue]$validate_8_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]PRINT8[/purple] => [red]"[/red][purple][blue]$email[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE9[/purple] => [red]"[/red][purple][blue]$validate_9_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]PRINT9[/purple] => [red]"[/red][purple][blue]$confirm_email[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE10[/purple] => [red]"[/red][purple][blue]$validate_10_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]PRINT10[/purple] => [red]"[/red][purple][blue]$address_1[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE11[/purple] => [red]"[/red][purple][blue]$validate_11_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]PRINT11[/purple] => [red]"[/red][purple][blue]$address_2[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE12[/purple] => [red]"[/red][purple][blue]$validate_12_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]PRINT12[/purple] => [red]"[/red][purple][blue]$town_city[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE13[/purple] => [red]"[/red][purple][blue]$validate_13_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]PRINT13[/purple] => [red]"[/red][purple][blue]$county[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE14[/purple] => [red]"[/red][purple][blue]$validate_14_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]PRINT14[/purple] => [red]"[/red][purple][blue]$postcode[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE15[/purple] => [red]"[/red][purple][blue]$validate_15_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE16[/purple] => [red]"[/red][purple][blue]$validate_16_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]PRINT16[/purple] => [red]"[/red][purple][blue]$telephone[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE17[/purple] => [red]"[/red][purple][blue]$validate_17_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]PRINT17[/purple] => [red]"[/red][purple][blue]$fax[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][blue]$template2[/blue]->[maroon]param[/maroon] [red]([/red] [purple]VALIDATE18[/purple] => [red]"[/red][purple][blue]$validate_18_warn[/blue][/purple][red]"[/red] [red])[/red][red];[/red][/li]
[li][/li]
[li][black][b]print[/b][/black] [red]"[/red][purple]Content-Type: text/html[purple][b]\n[/b][/purple][purple][b]\n[/b][/purple][/purple][red]"[/red], [blue]$template2[/blue]->[maroon]output[/maroon][red];[/red][/li]
[li][red]}[/red][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[li][gray][i]## END CHECK SCRIPT WAS EXECUTED FROM REGISTRATION FORM[/i][/gray][/li]
[li][red]}[/red][/li]
[li][olive][b]else[/b][/olive] [red]{[/red][/li]
[li][black][b]print[/b][/black] [red]"[/red][purple]Content-type: text/html[purple][b]\n[/b][/purple][purple][b]\n[/b][/purple][/purple][red]"[/red][red];[/red][/li]
[li][black][b]print[/b][/black] [red]qq([/red][purple]<font face="arial" size="2">$execution_check_m</font>[/purple][red])[/red][red];[/red][/li]
[li][red]}[/red][/li]
[li][gray][i]#######################################[/i][/gray][/li]
[/ol]
Pragmas (perl 5.8.8) used :
[ul]
[li]diagnostics - Produce verbose warning diagnostics[/li]
[li]strict - Perl pragma to restrict unsafe constructs[/li]
[li]warnings - Perl pragma to control optional warnings[/li]
[/ul]
Core (perl 5.8.8) Modules used :
[ul]
[li]CGI - Simple Common Gateway Interface Class[/li]
[/ul]
Other Modules used :
[ul]
[li]HTML::Template[/li]
[li]HTML::Template[/li]
[li]MIME::Lite[/li]
[/ul]
[/tt]
Chris