In Easy Steps Articles

August 15, 2019

Submitting HTML forms to a PERL Script

In order to process form data submitted from a web browser, the web server will typically employ a server-side script. A server-side script may be written in one of several scripting languages, such as PERL, PHP, or Python. The name of the server-side script is nominated by the action attribute in the HTML form tag. When the web server receives the form it calls upon the interpreter for that scripting language to execute the script. Following execution of the script the web server returns the response to the web browser.

The examples in Chapter 8 of HTML5 in easy steps use a server-side script written in the PERL language. This means that the web server must have the PERL interpreter (perl.exe) installed in order to execute the script. The web server must then be configured to locate the interpreter and recognize the script’s file extension (.pl), otherwise it will not understand how to process the script nominated by the action attribute in the form tag.

The steps below describe how to configure the Abyss web server for PERL.

The same principles apply for the PHP interpreter that is required to process server-side scripts in PHP. The MySQL database server must also be installed and configured correctly to add database functionality.

Here’s how to submit HTML forms to a PERL Script, in easy steps:

1) Install the Abyss Web Server Xl from aprelium.com/downloads

2) Install the ActivePerl PERL script interpreter from activestate.com/activeperl/downloads

3) Click the Abyss Web Server Xl item on the Start menu – to start the Abyss Web Server running

4) Open a web browser, then enter localhost:9999 into the web browser’s address field

5) Log in to the Abyss Web Server Console by entering your Username and Password

6) Click the Configure button on the Abyss Web Server Console – to open the Hosts screen

7) Click the Scripting Parameters icon on the Hosts screen – to open the Scripting Parameters screen

8) On the Scripting Parameters screen, check the box to Enable Scripts Execution

9) Next, click the Add button in the “Interpreters” section

10) Now, click the Browse button and select the location of the PERL interpreter perl.exe on your PC

11) Then, click the Add button in the “Associated Extensions” section – to open an Add screen

12) On the Add screen, type the PERL script file extension .pl, then click the OK button – to open an Edit screen

13) Click the OK button on the Edit screen – to return to the Scripting Parameters screen (below)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

14) Click the OK button on the Scripting Parameters screen – to return to the Hosts screen

15) On the Hosts screen, click the Restart button – to restart the Abyss Web Server with its new configuration

16) Ensure that files submit.html, echo.pl, echo.css, perl.png, abyss.png files are in the web server’s /htdocs folder

17) Now, enter localhost/submit.html into your web browser’s address field – to load the HTML form

 

 

 

 

 

 

18) Click the My Submit Button Value button to see the response from the web server (shown below)

 

 

 

 

 

 

Assistance with Abyss Web Server configuration is available at aprelium.com/support/

Mike McGrath

Sign up to our

Newsletter

Our newsletters inform you of new and forthcoming titles, handy tips, and other updates and special offers. You can opt out anytime.

"*" indicates required fields

By anniemcg

Share

We are sorry to let you go...

Would you mind giving us your feedback or reason of cancelling the subscription?

 

"*" indicates required fields

Hidden
Hidden
Hidden
Reason For Cancellation*
Hidden