View previous topic :: View next topic |
Author |
Message |
cagozoe -
Joined: 24 Apr 2005 Posts: 23
|
Posted: Thu Nov 24, 2005 4:44 am Post subject: how to not print to html file a feild that has no value from |
|
|
I have the following in perl script
what i need it to do is if no information is placed in the feild then don't print to html file.
print PAGE "<font size=\"4\">PRODUCT - $FORM{'productone'}</font>\n";
print PAGE "<font size=\"4\">Amount - $FORM{'productoneamount'} \n";
print PAGE "<font size=\"4\">PRODUCT - $FORM{'producttwo'}\n";
print PAGE "<font size=\"4\">Amount - $FORM{'producttwoamount'}
if no amount is typed into the form i dont need the PRODUCT or AMOUNT to print on html output file.
have a look
http://www.cvb.dns2go.com/truck/ffa-december.html
use the add to place information.
how can i have it NOT print feilds that have no value placed in the form? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Thu Nov 24, 2005 12:30 pm Post subject: Re: how to not print to html file a feild that has no value |
|
|
cagozoe,
Use the conditional test keyword if:
Code: |
if ($FORM{'productone'}) {
print PAGE "<font size=\"4\">PRODUCT - $FORM{'productone'}</font>\n";
}
|
_________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
cagozoe -
Joined: 24 Apr 2005 Posts: 23
|
Posted: Thu Nov 24, 2005 12:54 pm Post subject: thanks! |
|
|
Thanks |
|
Back to top |
|
|
|