Apache ASP

Server pages

Embedding code

Simple example


  <html>
  <body>
  For loop incrementing font size: <p>
  <% for(1..5) { %>
        <!-- iterated html text -->
        <font size="<%=$_%>" > Size = <%=$_%> </f
ont> <br>
  <% } %>
  </body>
  </html>

Name.pl as an ASP


#!/usr/local/bin/perl5 asp

<!--#include file=header.inc-->

<h1> Hobby </h1>
<% $name = $Request->Form('name');
   $Session->{name} = $name;
%>

<p>
Hi <%= $name =%>, please select a hobby

<form action="hobbies.pl">
<input
<select name="hobby">
<option  value="tennis">tennis
<option  value="chess">chess
<option  value="eating">eating
<option  value="dancing">dancing
</select>

<input type="submit">
</form><hr>
 </body></html>

Jan Newmarch (http://pandonia.canberra.edu.au)
jan@ise.canberra.edu.au
Last modified: Tue Aug 22 15:30:36 EST 2000
Copyright ©Jan Newmarch