Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4560486
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:56:12+00:00 2026-05-21T17:56:12+00:00

This is a simple assignment to set up link tags for 5 English words:

  • 0

This is a simple assignment to set up link tags for 5 English words: Hello, Good-bye, Love, Cat, and Dog. Each href are completed by linking to the Spanish.pl file and passing the Spanish equivalents for each word: Hola, Adios, Amor, Gato, and Perro.

The following is the code from spanish.html:

<p><a href="cgi-bin/spanish.pl?english=Hello&spanish=Hola">Hello</a></p>
<p><a href="cgi-bin/spanish.pl?english=Good-bye&spanish=Adios">Good-bye</a></p>
<p><a href="cgi-bin/spanish.pl?english=Love&spanish=Amor">Love</a></p>
<p><a href="cgi-bin/spanish.pl?english=Cat&spanish=Gato">Cat</a></p>
<p><a href="cgi-bin/spanish.pl?english=Dog&spanish=Perro">Dog</a></p>

This is from spanish.pl:

print "The Spanish word for ", param('english'), " is ", param('spanish') "\n";

I’m not very familiar with Perl yet, but I’m not sure what to do. When you click on the link for the english word it just downloads the perl file. How do I get it to just display the spanish word in the browser?

Also, should it be simple or similar when doing the same exact assignment but in ASP and PHP? I’m not sure what they should look like…

I have this in my php file, but not sure if this is correct:

The Spanish word for <?php echo $_POST["english"]; ?> is <?php echo $_POST["spanish"]; ?>.

I just need help fixing my code and understanding how to get this to display properly.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T17:56:13+00:00Added an answer on May 21, 2026 at 5:56 pm

    <p><a href="cgi-bin/spanish.pl?english=Hello&spanish=Hola">Hello</a></p>

    Validate. Validate. Validate. That should be &amp;

    print "The Spanish word for ", param('english'), " is ", param('spanish') "\n";

    If that is being output into an HTML document, then you have an XSS problem.

    When you click on the link for the english word it just downloads the perl file.

    You need to:

    1. pick an API for communicating between the web server and the Perl program.
      • CGI is the simplest option, but suffers from serious efficiency problems.
      • PSGI is the modern approach.
    2. ensure the Perl program conforms to that API
    3. configure the web server to execute the Perl program for the given URL (the specifics of which depend on the web server you are using)

    Also, should it be simple or similar when doing the same exact assignment but in ASP and PHP?

    Once configured, ASP and PHP make some assumptions about what you want to do (such as “You want to output an HTML document”) that you don’t get from writing CGI from scratch (where you have to explicitly send Content-Type headers, for instance).

    The Spanish word for <?php echo $_POST["english"]; ?> is <?php echo $_POST["spanish"]; ?>.

    Links make GET requests, not POST requests.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This simple code is not producing any sound on a couple of machines that
I need to validate this simple pick list: <select name=<%= key %>> <option value=ETC
Say I have this simple form: class ContactForm(forms.Form): first_name = forms.CharField(required=True) last_name = forms.CharField(required=True)
I have this simple regex, [\d]{1,5} that matches any integer between 0 and 99999.
I'm using this simple regular expression to validate a hex string: ^[A-Fa-f0-9]{16}$ As you
I have this simple Jsp page: <%@ page language=java import=java.awt.Color%> <% Color background =
I have this simple php script <?php echo '<pre>'; // Outputs all the result
i want to do this simple piece of code work. #include <iostream> #include <windows.h>
I'm trying to get this simple PowerShell script working, but I think something is
What is the function of the namespace here? I would think in this simple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.