For some reason when I include the if ($per_admin){....statement I will get an error" DBman encountered an Internal error"
This is what I typed in
sub html_record_form {
# --------------------------------------------------------
# The form fields that will be displayed each time a record is
# edited (including searching). You don't want to put the
# <FORM> and </FORM tags, merely the <INPUT> tags for each field.
# The values to be displayed are in %rec and should be incorporated
# into your form. You can use &build_select_field, &build_checkbox_field
# and &build_radio_field to generate the respective input boxes. Text and
# Textarea inputs can be inserted as is. If you turn on form auto
# generation, the program will build the forms for you (all though they may
# not be as nice). See the README for more info.
my (%rec) = @_;
#($db_auto_generate and print &build_html_record_form(%rec) and return);
my $font = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399';
print qq|
<TABLE WIDTH="450" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#FFFFCC">|;
if ($per_admin) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>ID:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="ID" VALUE="$rec{'ID'}" SIZE="3" MAXLENGTH="3"></TD></TR>|;
}
else {
print qq|<input type="hidden" name="ID">|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Name:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Name" VALUE="$rec{'Name'}" SIZE="40" MAXLENGTH="255"></TD></TR>|;
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Date:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Date" VALUE="$rec{'Date'}" SIZE="12" MAXLENGTH="12"></TD></TR>|;
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Category:</FONT></TD>
<TD VALIGN="TOP"> |; print &build_select_field ("Category", "$rec{'Category'}"); print qq|</TD></TR>|;
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Message:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Message" ROWS="4" COLS="40" WRAP="VIRTUAL" MAXLENGTH="255">$rec{'Description'}</TEXTAREA></TD></TR>
</TABLE>
|;
}
Prior to this I was able to login. I am finding this very frustrating. I still have an outstanding problem from before but I like to get this one resolve first. Thank you.
Perl is not my strength so please be clear and patient with me. I greatly appreciate it. :-)
Always on a mission!!
This is what I typed in
sub html_record_form {
# --------------------------------------------------------
# The form fields that will be displayed each time a record is
# edited (including searching). You don't want to put the
# <FORM> and </FORM tags, merely the <INPUT> tags for each field.
# The values to be displayed are in %rec and should be incorporated
# into your form. You can use &build_select_field, &build_checkbox_field
# and &build_radio_field to generate the respective input boxes. Text and
# Textarea inputs can be inserted as is. If you turn on form auto
# generation, the program will build the forms for you (all though they may
# not be as nice). See the README for more info.
my (%rec) = @_;
#($db_auto_generate and print &build_html_record_form(%rec) and return);
my $font = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399';
print qq|
<TABLE WIDTH="450" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#FFFFCC">|;
if ($per_admin) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>ID:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="ID" VALUE="$rec{'ID'}" SIZE="3" MAXLENGTH="3"></TD></TR>|;
}
else {
print qq|<input type="hidden" name="ID">|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Name:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Name" VALUE="$rec{'Name'}" SIZE="40" MAXLENGTH="255"></TD></TR>|;
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Date:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="TEXT" NAME="Date" VALUE="$rec{'Date'}" SIZE="12" MAXLENGTH="12"></TD></TR>|;
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Category:</FONT></TD>
<TD VALIGN="TOP"> |; print &build_select_field ("Category", "$rec{'Category'}"); print qq|</TD></TR>|;
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Message:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Message" ROWS="4" COLS="40" WRAP="VIRTUAL" MAXLENGTH="255">$rec{'Description'}</TEXTAREA></TD></TR>
</TABLE>
|;
}
Prior to this I was able to login. I am finding this very frustrating. I still have an outstanding problem from before but I like to get this one resolve first. Thank you.
Perl is not my strength so please be clear and patient with me. I greatly appreciate it. :-)
Always on a mission!!