Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IF statement in HTML

Status
Not open for further replies.

samesale

Programmer
Sep 15, 2003
133
US
I am trying to write a logical statement in HTML as:

if $FORM{'$photo'} eq "YES" then You want to include a picture. Please either e-mail to: "sales\@xxxx.com" it as an attachment or mail to:

However, it gives me an error.

Please help. Thanks.
 
That's because HTML is a markup language not a programming language - it has no concept of conditional operations, loops, variables or other programming language constructs.

If you want to display one thing or another based on some sort of input you will either need to use Javascript (to perform the operation client side) or submit the form, let the server do the processing and return the appropriate HTML to the user.

If you post a clearer description of 'what' effect you are trying to achieve, someone will be able to direct you to the most appropriate method of achieving it.

Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top