Link to home
Start Free TrialLog in
Avatar of lshane
lshane

asked on

PHP: Syntax for IF THEN statement to display a form field

Hello.  I know very little about PHP.  I primarily use ASP.  I am, however, having to alter a portion of code on a PHP page.

I need to have an IF THEN statement to display a form field ("Lyme").

The conditional statement is on an "Order Confirmation" page.  There is a form on the "Order" page named "Lyme".  On the "Order Confirmation" page, I would like to basically say:

IF {formfieldfrom ORDER page} is equal to "Y" THEN
Display a paragraph of text
ELSE
Do not display anything


How can I do this?

Thanks so much,
Shane
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lshane
lshane

ASKER

Thanks, angellll.  I appreciate that!

I'll give it a try shortly, but it seems very straightforward.


Thanks again,
Shane
Avatar of lshane

ASKER

One other quick question, please:

Do I need to place delimiters around that code?  (i.e. <?......?>    OR   <? PHP..... ?>    etc.)
yes, as that is PHP code.
you should prefer the <?PHP ?> version, as the <? shorttags version is not supported (configured) on all web hostings...
Avatar of lshane

ASKER

Thanks SO much!