Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

CGI outputting FLASH POST variable

Posted on 2003-10-23
2
258 Views
Last Modified: 2013-12-25
I have an issue with a CGI script (I think). What I'm trying to do is actually a workaround to something that will not work in Flash. I've come to the conclusion based on this site (and others) that a Perl CGI call is the best solution.

Basically, I'm sending one variable that contains the text to generate a web page. I want the CGI script to take this one variable and output it That's it. The code that creates the html text is in Flash. The meat of the content is created within a "for" loop and recursively added to this one variable.

I get the new page and I get the start and ending tags of the page, but I only get the last text item in the loop to appear. I did a "trace" on the variable in Flash and all the text is there, so I'm going on the assumption that my CGI script is wrong. It's a simple script (with an included library file) that I downloaded from another site and I honestly don't understand everything that's going on in it. I believe that the library file contains a script to parse the POSTed variable.

Can someone please post an example of how to read a posted variable and display it using a Perl CGI script?

Thanks!
0
Comment
Question by:jtlyonsden
2 Comments
 
LVL 8

Accepted Solution

by:
inq123 earned 250 total points
ID: 9609588
replace the "myvar" in "param('myvar')" below with the name of your variable.  If your variable's like <input type=text name=abc value=12345> then replace "myvar" with "abc" (I guess I don't need to explain in such detail but it doesn't hurt).  The code begins below:

#!/usr/bin/perl

use CGI qw/:standard/;

if (param())
{
 print header,
       start_html('display variable'),
       h1("Here is the variable:".param('myvar')."\n");
       hr;
}
0
 

Author Comment

by:jtlyonsden
ID: 9610372
Thanks for the help. I actually figured this one out in the meantime. I just altered the library script a little and it now works.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question