Debian Codegraph @

eg/x/if.htm

raw
1
2 <html>
3 <head>
4 <title>Embperl Examples - If Metacommands</title>
5 </head>
6 <body background="../images/jazzbkgd.gif">
7
8 <h1>Embperl Examples - If Metacommands</h1>
9 <hr><h3>The following displays an sentence depending on the method (GET, POST, other)</h3>
10
11 [$ if $ENV{REQUEST_METHOD} eq 'GET' $]
12 This is a GET request
13 [$ elsif $ENV{REQUEST_METHOD} eq 'POST' $]
14 This is a POST request
15 [$ else $]
16 This is not GET and not POST
17 [$ endif $]
18
19
20 <hr><h3>The following displays an different sentence depending on the show parameter</h3>
21
22
23 [$ if $fdat{show} eq 'yes' $]
24 The show parameter is 'yes'
25 [$ elsif $fdat{show} eq 'no' $]
26 Nothing to show
27 [$ else $]
28 Request with if.htm?show=yes<BR>
29 of with if.htm?show=no<BR>
30 [$ endif $]
31
32 <p><hr>
33
34 <small>HTML::Embperl (c) 1997-1998 G.Richter</small>
35
36 </body>
37 </html>