Hey all,
First, I gotta say this is an awesome database script..
But i'm having a problem with something. I have a bunch of form feilds in kind of a seperate "category" with about 5 form inputs, $rec{'test1'}, $rec{'test2'}.... etc. i don't want them to show up in the html_record output if nothing is entered into the form in those fields. But if nothing is entered into all 5 fields I don't want anything in that seperate "category" to show up .. I kindda figured out most of it but it still prints out the if ( @test_input ne "") part ..... here's what i have already.. maybe it'll kindof explain what i'm talking about..
@test_input = qw( $rec{'test1'}$rec{'test2'}$rec{'test3'}$rec{'test4'}$rec{'test5'} );
if ( @test_input ne "" ) {
print qq|
<tr>
<td colspan=2> <hr width=90% size=3 color="red" >
|;
print qq| test 1 = $rec{'test1'}<BR> | if ( $rec{'test1'} ne "" );
print qq| test 2 = $rec{'test2'}<BR> | if ( $rec{'test2'} ne "" );
print qq| test 3 = $rec{'test3'}<BR> | if ( $rec{'test3'} ne "" );
print qq| test 4 = $rec{'test4'}<BR> | if ( $rec{'test4'} ne "" );
print qq| test 5 = $rec{'test5'}<BR> | if ( $rec{'test5'} ne "" );
print qq|
</td>
</tr> |;
}
Everyone i talk to says it right, but it doesn't work :(
I don't want anything in the if ( @test_input ne "" ) to print out if none of the 5 fields are filled out..
Can anyone help ???
First, I gotta say this is an awesome database script..
But i'm having a problem with something. I have a bunch of form feilds in kind of a seperate "category" with about 5 form inputs, $rec{'test1'}, $rec{'test2'}.... etc. i don't want them to show up in the html_record output if nothing is entered into the form in those fields. But if nothing is entered into all 5 fields I don't want anything in that seperate "category" to show up .. I kindda figured out most of it but it still prints out the if ( @test_input ne "") part ..... here's what i have already.. maybe it'll kindof explain what i'm talking about..
@test_input = qw( $rec{'test1'}$rec{'test2'}$rec{'test3'}$rec{'test4'}$rec{'test5'} );
if ( @test_input ne "" ) {
print qq|
<tr>
<td colspan=2> <hr width=90% size=3 color="red" >
|;
print qq| test 1 = $rec{'test1'}<BR> | if ( $rec{'test1'} ne "" );
print qq| test 2 = $rec{'test2'}<BR> | if ( $rec{'test2'} ne "" );
print qq| test 3 = $rec{'test3'}<BR> | if ( $rec{'test3'} ne "" );
print qq| test 4 = $rec{'test4'}<BR> | if ( $rec{'test4'} ne "" );
print qq| test 5 = $rec{'test5'}<BR> | if ( $rec{'test5'} ne "" );
print qq|
</td>
</tr> |;
}
Everyone i talk to says it right, but it doesn't work :(
I don't want anything in the if ( @test_input ne "" ) to print out if none of the 5 fields are filled out..
Can anyone help ???